Hi there folks,<br><br>Just a quicky. I've been mucking around with iptables for a while, but I'm still a bit shaky with them. Would anyone mind checking this over for me please?<br><br>I want to be able to accept incoming connections on port 22, accept any connections which are a reply to a connection that I have initiated to an outside TCP address, but other than that, I want to drop all other TCP connections coming in.<br>
<br>Does this look right?<br><br>On a side note, I've added a symbolic link called S95firewall to this script in /etc/rc2.d/, but it doesn't seem to run this script at startup? Any ideas what I'm doing wrong?<br>
<br>Cheers<br><br>Chris<br><br>echo "Applying firewall rules"<br>iptables -F<br>iptables -A INPUT -p tcp -i eth0 --dport 22 -j ACCEPT<br>iptables -A INPUT -p tcp -i eth0 -m state --state ESTABLISHED -j ACCEPT<br>
iptables -A INPUT -p tcp -i eth0 -j DROP<br>echo "Rules applied"<br><br>