Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    DROP input except for 1713

    Can anyone help me iptables solution for the follwing specification.
    I want to drop all packets coming to my host , except for port 1713 .

    It doesn't work :
    iptables -A INPUT -i eth0 -J DROP
    iptables -A INPUT -p tcp --dport 1713 -j ACCEPT

  2. #2
    Linux Newbie
    Join Date
    Jan 2004
    Belgrade, S&M
    You have to put the second rule first:

    iptables -A INPUT -p tcp --dport 1713 -j ACCEPT
    ptables -A INPUT -i eth0 -J DROP

    It is a matter of priority. Otherwise everything will be dropped.

Posting Permissions

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