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

    problem iptables

    Hello, ssh server is listening on port 2340 on my server, I added this rule to iptables but when iptables starts I can't get connected to port 2340, why ?
    All output is accepted.

    iptables -A INPUT -p tcp -m tcp --dport 20348 -j ACCEPT

  2. #2
    Linux Engineer
    Join Date
    Apr 2012
    Virginia, USA
    iptables works in 'chains'

    If there is a statement above that rule that would drop a packet, such as 'reject all' or similar default iptables rule, the packet would be dropped before it made it to your rule.
    The solution to this is to use iptables -I INPUT
    -I = insert
    -A = append (to the end).

Posting Permissions

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