Hi there folks,<br><br>Just a quicky. I&#39;ve been mucking around with iptables for a while, but I&#39;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&#39;ve added a symbolic link called S95firewall to this script in /etc/rc2.d/, but it doesn&#39;t seem to run this script at startup? Any ideas what I&#39;m doing wrong?<br>
<br>Cheers<br><br>Chris<br><br>echo &quot;Applying firewall rules&quot;<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 &quot;Rules applied&quot;<br><br>