Ubuntu ufw: set a rule on a per interface basis

203

Solution 1

I finally read the man page:

By default, ufw will apply rules to all available interfaces. To
limit  this,  specify DIRECTION on INTERFACE, where DIRECTION is
one of in or out (interface aliases  are  not  supported).   For
example,  to  allow  all  new incoming http connections on eth0,
use:

ufw allow in on eth0 to any port 80 proto tcp

To elaborate a little the answer is yes, ufw can use the interface as a target. My particular rule looked like this:

ufw allow in on eth1 to [eth1 ip addr] port 80 proto tcp

Solution 2

Yes, if eth1 is just a normal interface with its own IP address (and that IP address is what you're trying to grant access to):

ufw allow from any to [eth1 ip addr] port 80

But if there's anything more complicated than that, then we need more info about how this system is set up.

Share:
203

Related videos on Youtube

Jordan
Author by

Jordan

Updated on September 18, 2022

Comments

  • Jordan
    Jordan over 1 year

    I have a couple questions about the iOS tab bar.

    My first question is, is the image always tinted automatically? Say for example, I used an image that was colored red, is there a way to get it to show the red without tinting it? I guess what I am saying is, can you show the natural color?

    My second question is, assuming the tinting is mandatory, how would I go about tinting the images in the tab bar that are not the currently selected image? I have the selected image tint figured out.

    I tried changing the tint under, UIView.appearance() I believe and that worked, but when I selected a different tab, and then navigated back the color went back to the former grayish color.

    If I am not being clear enough, let me know and I will explain more. I am using swift, so any examples you give would be great in swift! Thanks!

    • Antonius Bloch
      Antonius Bloch almost 13 years
      I'm specifically looking to specify the interface, not the ip or network.
    • Antonius Bloch
      Antonius Bloch almost 13 years
      This is a management workstation/cobbler/puppet server. It's got 4 interfaces connecting it to 4 different networks, 2 public networks & 1 multi-tenant network & 1 private management network. I want to make sure that the tftp,dhcp servers and other provisioning services are only available on the management network and not on the other networks.
    • matt
      matt over 9 years
      "how would I go about tinting the images in the tab bar that are not the currently selected image" You can't. It used to be possible, but in iOS 7 Apple took this feature away! I regard this as a bug.
  • Antonius Bloch
    Antonius Bloch almost 13 years
    See my comments above, since it's possible that the tenants can change network settings and access that ip address this might not work out well.
  • ravi yarlagadda
    ravi yarlagadda almost 13 years
    If they can change network settings then they have root and can change firewall rules, too, regardless of which software firewall is used.