1

Recently I added to iptables a rule which was supposed to allow incoming traffic through port 993. The rule I used is the one shown below:

sudo iptables -A INPUT -p tcp --dport 993 -j ACCEPT

After I entered the rule, I ran "iptables-save > /etc/iptables/rules.v4" and rebooted the server. However when I use the telnet command to check the port I am getting following error.

telnet localhost 993

it tells me the connection is refused by the host (my server). This is not only happening to this port but to other ports I try to open. Am I doing something wrong, running a wrong command, etc? Please help me.

Wonderhost
  • 13
  • 2

1 Answers1

0

-A appends the rule to the end of the list of rules. So if a previous rule drops the packet, the packet is not going to be accepted. Use -I instead of -A. Also, check if a rule in other tables or in chain PREROUTING drops the packet.

v7d8dpo4
  • 116
  • 1