iptables rules for ssh
I have opened tcp port 22 in order to let in ssh connections from another machine on my LAN. However, I cannot start the ssh connection (from the other machine). If I stop iptables and log in and then start iptables again then the ssh seccion continues to work. What's up?
|
could you post your iptables script (for analysis)??
|
there are SYN packets, that are used to 'start' tcp session.
probably you have SYN packets filtered , whereas 'regular' packets can pass through.. |
>> could you post your iptables script (for analysis)??
The ssh rule looks like this iptables -A INPUT -i $LAN_INTERFACE -p tcp \ -s $LAN_ADDRESSES \ --sport $UNPRIVPORTS \ --dport 22 \ -m state --state NEW -j ACCEPT |
Quote:
Code:
iptables -A INPUT -p TCP -i $LAN_INTERFACE -s $LAN_ADDRESSES -m state \ Code:
iptables -A OUTPUT -p TCP -o $LAN_INTERFACE -s $LAN_INTERFACE_IP -j ACCEPT Code:
iptables -A OUTPUT -p TCP -o $LAN_INTERFACE -s $LAN_INTERFACE_IP --sport 22 \ good luck... |
All times are GMT -5. The time now is 11:16 AM. |