Find the answer to your Linux question:
Results 1 to 4 of 4
Hey guys i am very new to iptables and was just wondering what the following commands do and what type of attacks they would prevent. Am I correct in assuming ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2006
    Posts
    8

    iptables newbie question


    Hey guys i am very new to iptables and was just wondering what the following commands do and what type of attacks they would prevent.

    Am I correct in assuming the first command allows traffic from port 80?

    I am a bit confused so any help would be great thanks.

    iptables -I FORWARD 1 -p tcp -dport 80 -j ACCEPT

    iptables -I FORWARD 2 -p tcp -sport 80 -j ACCEPT

  2. #2
    Linux Newbie framp's Avatar
    Join Date
    Jul 2006
    Location
    Stuttgart, Germany
    Posts
    240
    Quote Originally Posted by jon182
    Am I correct in assuming the first command allows traffic from port 80?
    There are different queues used by iptables: The FORWARD queue which forwards requests to other systems (That's your example) and INPUT/OUTPUT queues (local queues of the system the iptables rules is acive).

    If the destination port 80 is local: NO
    If the destination port 80 is on a system connected on a different nic: YES
    "Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect." Linus Benedict Torvalds

  3. #3
    Just Joined!
    Join Date
    Oct 2006
    Posts
    8
    Thanks for the reply after the forward command why is there a number in this case 1 and 2?

    thanks again

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Newbie framp's Avatar
    Join Date
    Jul 2006
    Location
    Stuttgart, Germany
    Posts
    240
    Frankly - I missed this. I used 'man iptables' and found out it's a rule number. I never needed this rulenumber for my FW rules.
    "Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect." Linus Benedict Torvalds

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •