Hi there folks,

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?

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.

Does this look right?

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?

Cheers

Chris

echo "Applying firewall rules"
iptables -F
iptables -A INPUT -p tcp -i eth0 --dport 22 -j ACCEPT
iptables -A INPUT -p tcp -i eth0 -m state --state ESTABLISHED -j ACCEPT
iptables -A INPUT -p tcp -i eth0 -j DROP
echo "Rules applied"
-- 
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.ubuntu.org/UKTeam/

Reply via email to