Find the answer to your Linux question:
Results 1 to 3 of 3
Hello, Can anyone help me iptables solution for the follwing specification. I want to allow all packets coming to port 80 , but reject traffic coming out through port 80 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2003
    Posts
    6

    iptables help needed...


    Hello,

    Can anyone help me iptables solution for the follwing specification.
    I want to allow all packets coming to port 80, but reject traffic coming out through port 80.

    Thanks

  2. #2
    Linux Engineer
    Join Date
    May 2003
    Location
    Greece / Athens
    Posts
    1,169
    use man iptables for more information on this..
    Linux For Ever!

  3. #3
    Linux Newbie
    Join Date
    Jan 2004
    Location
    Belgrade, S&M
    Posts
    177
    This is what you asked for:

    iptables -A INPUT -p tcp --dport 80 -j ACCEPT
    iptables -A OUTPUT -p tcp --sport 80 -j DENY

    You can change DENY to DROP but I can't see any use of it as no connection will work with only receivng packets...

  4. $spacer_open
    $spacer_close

Posting Permissions

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