This seems to do what I want, but I want to make sure it is. The syntax for this stuff makes little sense, and getting this to work has been a PITA.
Basically, I want this rule to allow SSH from $machine2 (an ssh gateway) to the system iptables is running on. It should allow new and established connections, and keep track of state.
Is this doing what I want? Is there something more I could add, or something I should change?
Thanks in advance!
iptables -I INPUT 1 -s $machine2 -p TCP --dport 22 -m state --state NEW,ESTABLISHED -i eth1 -j ACCEPT
Basically, I want this rule to allow SSH from $machine2 (an ssh gateway) to the system iptables is running on. It should allow new and established connections, and keep track of state.
Is this doing what I want? Is there something more I could add, or something I should change?
Thanks in advance!