Hi guys
Have a question about IPTABLES I hope someone can help me with.
Here is my current firewall script...
Code:
#!/bin/sh
IPT=/sbin/iptables
# Close all ports by default.
$IPT -P INPUT DROP
$IPT -P OUTPUT DROP
$IPT -P FORWARD DROP
# Flush all rules.
$IPT -F
# Allow SSH traffic.
$IPT -A INPUT -p tcp --dport 22 -j ACCEPT
$IPT -A OUTPUT -p tcp --sport 22 -j ACCEPT
#Allow DNS Traffic
$IPT -A INPUT -p udp --sport 53 -j ACCEPT
$IPT -A OUTPUT -p udp --dport 53 -j ACCEPT
Now when I rerun the script, none of my connections that are allready established get disconnected.
How can I first, make all connections close, and secondly prevent connections from being closed? as I have a static IP and want to prevent disconnection from that.
Thankyou.