View Single Post
  #4  
Old 15th March 2006, 08:00
zacch zacch is offline
Junior Member
 
Join Date: Mar 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi
I have manage to extract out the iptables-save to iptables.txt
I will pas them here pls advise me what to do I have no idea what are all this too many of them don't know which one is important

Pls advise TQ in advance!

<INTERNET> -- <building> ------ <firewall> --------------------- <LAN>
ext NIC:172.x.x.x / int NIC:10.1.x.x LAN : 10.1.x.x

will post the iptables file in a few parts

# Generated by iptables-save v1.2.9 on Wed Mar 15 13:42:01 2006
*mangle
:PREROUTING ACCEPT [27204:15872792]
:INPUT ACCEPT [4691:896244]
:FORWARD ACCEPT [22513:14976548]
:OUTPUT ACCEPT [3552:828728]
:POSTROUTING ACCEPT [26031:15793591]
-A PREROUTING -p tcp -m state --state NEW,RELATED,ESTABLISHED -m tcp --sport 20 -j TOS --set-tos 0x08
-A PREROUTING -p tcp -m state --state NEW,RELATED,ESTABLISHED -m tcp --dport 20 -j TOS --set-tos 0x08
-A PREROUTING -p tcp -m state --state NEW,RELATED,ESTABLISHED -m tcp --sport 80 -j TOS --set-tos 0x08
-A PREROUTING -p tcp -m state --state NEW,RELATED,ESTABLISHED -m tcp --dport 80 -j TOS --set-tos 0x08
-A PREROUTING -p tcp -m state --state NEW,RELATED,ESTABLISHED -m tcp --sport 53 -j TOS --set-tos 0x10
-A PREROUTING -p udp -m state --state NEW,RELATED,ESTABLISHED -m udp --dport 53 -j TOS --set-tos 0x10
-A PREROUTING -p udp -m state --state NEW,RELATED,ESTABLISHED -m udp --dport 161 -j TOS --set-tos 0x04
-A PREROUTING -p udp -m state --state NEW,RELATED,ESTABLISHED -m udp --dport 162 -j TOS --set-tos 0x04
-A PREROUTING -p udp -m udp --dport 514 -j TOS --set-tos 0x04
-A OUTPUT -p tcp -m state --state NEW,RELATED,ESTABLISHED -m tcp --sport 20 -j TOS --set-tos 0x08
-A OUTPUT -p tcp -m state --state NEW,RELATED,ESTABLISHED -m tcp --dport 20 -j TOS --set-tos 0x08
-A OUTPUT -p tcp -m state --state NEW,RELATED,ESTABLISHED -m tcp --sport 80 -j TOS --set-tos 0x08
-A OUTPUT -p tcp -m state --state NEW,RELATED,ESTABLISHED -m tcp --dport 80 -j TOS --set-tos 0x08
-A OUTPUT -p tcp -m state --state NEW,RELATED,ESTABLISHED -m tcp --sport 53 -j TOS --set-tos 0x10
-A OUTPUT -p udp -m state --state NEW,RELATED,ESTABLISHED -m udp --dport 53 -j TOS --set-tos 0x10
-A OUTPUT -p udp -m state --state NEW,RELATED,ESTABLISHED -m udp --dport 161 -j TOS --set-tos 0x04
-A OUTPUT -p udp -m state --state NEW,RELATED,ESTABLISHED -m udp --dport 162 -j TOS --set-tos 0x04
-A OUTPUT -p udp -m udp --dport 514 -j TOS --set-tos 0x04
COMMIT
# Completed on Wed Mar 15 13:42:01 2006
# Generated by iptables-save v1.2.9 on Wed Mar 15 13:42:01 2006
*filter
:INPUT DROP [0:0]
:FORWARD DROP [2:166]
:OUTPUT ACCEPT [0:0]
:forward_dmz - [0:0]
:forward_ext - [0:0]
:forward_int - [0:0]
:input_dmz - [0:0]
:input_ext - [0:0]
:input_int - [0:0]
:reject_func - [0:0]
-A INPUT -i lo -j ACCEPT
-A INPUT -s 127.0.0.0/255.0.0.0 -j LOG --log-prefix "SFW2-IN-DROP-ANTISPOOF " --log-tcp-options --log-ip-options
-A INPUT -d 127.0.0.0/255.0.0.0 -j LOG --log-prefix "SFW2-IN-DROP-ANTISPOOF " --log-tcp-options --log-ip-options
-A INPUT -s 127.0.0.0/255.0.0.0 -j DROP
-A INPUT -d 127.0.0.0/255.0.0.0 -j DROP
-A INPUT -s 10.1.0.254 -j LOG --log-prefix "SFW2-IN-DROP-ANTISPOOF " --log-tcp-options --log-ip-options
-A INPUT -s 10.1.0.254 -j DROP
-A INPUT -s 172.17.17.20 -j LOG --log-prefix "SFW2-IN-DROP-ANTISPOOF " --log-tcp-options --log-ip-options
-A INPUT -s 172.17.17.20 -j DROP
-A INPUT -d 255.255.255.255 -i eth0 -j DROP
-A INPUT -d 172.17.17.255 -i eth0 -j DROP
-A INPUT -d 255.255.255.255 -i eth1 -j DROP
-A INPUT -d 10.1.255.255 -i eth1 -j DROP
-A INPUT -i eth0 -j input_ext
-A INPUT -i eth1 -j input_int
-A INPUT -d 172.17.17.20 -i eth1 -j LOG --log-prefix "SFW2-IN-ACC_DENIED_INT " --log-tcp-options --log-ip-options
-A INPUT -d 172.17.17.20 -i eth1 -j DROP
-A INPUT -j LOG --log-prefix "SFW2-IN-ILL-TARGET " --log-tcp-options --log-ip-options
-A INPUT -j DROP
-A FORWARD -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
-A FORWARD -i eth1 -o eth1 -j ACCEPT
-A FORWARD -i eth0 -o eth0 -j ACCEPT
-A FORWARD -i eth0 -j forward_ext
-A FORWARD -i eth1 -j forward_int
-A FORWARD -j LOG --log-prefix "SFW2-FWD-ILL-ROUTING " --log-tcp-options --log-ip-options
-A FORWARD -j DROP
-A FORWARD -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -j LOG --log-prefix "SFW2-FORWARD-ERROR " --log-tcp-options --log-ip-options
-A OUTPUT -o lo -j ACCEPT
-A OUTPUT -p icmp -m icmp --icmp-type 11 -j LOG --log-prefix "SFW2-OUT-TRACERT-ATTEMPT " --log-tcp-options --log-ip-options
-A OUTPUT -p icmp -m icmp --icmp-type 11 -j ACCEPT
-A OUTPUT -p icmp -m icmp --icmp-type 3/3 -j ACCEPT
-A OUTPUT -p icmp -m icmp --icmp-type 3/4 -j ACCEPT
-A OUTPUT -p icmp -m icmp --icmp-type 3/9 -j ACCEPT
-A OUTPUT -p icmp -m icmp --icmp-type 3/10 -j ACCEPT
-A OUTPUT -p icmp -m icmp --icmp-type 3/13 -j ACCEPT
-A OUTPUT -p icmp -m icmp --icmp-type 3 -j DROP
-A OUTPUT -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT
-A OUTPUT -j LOG --log-prefix "SFW2-OUTPUT-ERROR " --log-tcp-options --log-ip-options
-A forward_dmz -s 172.17.17.0/255.255.255.0 -j LOG --log-prefix "SFW2-FWDdmz-DROP-ANTISPOOF " --log-tcp-options --log-ip-options
-A forward_dmz -s 172.17.17.0/255.255.255.0 -j DROP
-A forward_dmz -s 10.1.0.0/255.255.0.0 -j LOG --log-prefix "SFW2-FWDdmz-DROP-ANTISPOOF " --log-tcp-options --log-ip-options
-A forward_dmz -s 10.1.0.0/255.255.0.0 -j DROP
-A forward_dmz -d 10.1.0.254 -j LOG --log-prefix "SFW2-FWDdmz-DROP-CIRCUMV " --log-tcp-options --log-ip-options
-A forward_dmz -d 10.1.0.254 -j DROP
-A forward_dmz -d 172.17.17.20 -j LOG --log-prefix "SFW2-FWDdmz-DROP-CIRCUMV " --log-tcp-options --log-ip-options
-A forward_dmz -d 172.17.17.20 -j DROP
-A forward_dmz -p icmp -m state --state RELATED -m icmp --icmp-type 3 -j ACCEPT
-A forward_dmz -p icmp -m state --state RELATED,ESTABLISHED -m icmp --icmp-type 0 -j ACCEPT
-A forward_dmz -o eth0 -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT
-A forward_dmz -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A forward_dmz -p tcp -m tcp --tcp-flags SYN,RST,ACK SYN -j LOG --log-prefix "SFW2-FWDdmz-DROP-DEFLT " --log-tcp-options --log-ip-options
-A forward_dmz -p icmp -m icmp --icmp-type 4 -j LOG --log-prefix "SFW2-FWDdmz-DROP-DEFLT " --log-tcp-options --log-ip-options
-A forward_dmz -p icmp -m icmp --icmp-type 5 -j LOG --log-prefix "SFW2-FWDdmz-DROP-DEFLT " --log-tcp-options --log-ip-options
-A forward_dmz -p icmp -m icmp --icmp-type 8 -j LOG --log-prefix "SFW2-FWDdmz-DROP-DEFLT " --log-tcp-options --log-ip-options
-A forward_dmz -p icmp -m icmp --icmp-type 13 -j LOG --log-prefix "SFW2-FWDdmz-DROP-DEFLT " --log-tcp-options --log-ip-options
-A forward_dmz -p icmp -m icmp --icmp-type 17 -j LOG --log-prefix "SFW2-FWDdmz-DROP-DEFLT " --log-tcp-options --log-ip-options
-A forward_dmz -p udp -j LOG --log-prefix "SFW2-FWDdmz-DROP-DEFLT " --log-tcp-options --log-ip-options
-A forward_dmz -m state --state INVALID -j LOG --log-prefix "SFW2-FWDdmz-DROP-DEFLT-INV " --log-tcp-options --log-ip-options
-A forward_dmz -j DROP
-A forward_ext -s 10.1.0.0/255.255.0.0 -j LOG --log-prefix "SFW2-FWDext-DROP-ANTISPOOF " --log-tcp-options --log-ip-options
Reply With Quote