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
Printable View
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
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).