Hellosztok.
Csináltam egy egyszerű iptables natos tűzfalat, minden működik, de néhány weblap nem jön be a lan oldalon lévő gépeken :( . Ping -elni lehet a web servereket, de nem jönnek be sem IE7 sem MF 3.0-n.
Az iptables INPUT DROP részén kb. 10 percenként van egy csomag amit megfog szóval mintha csak a webböngésző nem tudná, hogy mivan. Statikus IP címek vannak beállítva a lanos gépeken és a szolgáltató DNS címei. Invitel ADSL van belőve az eth1 -re és eth0 a lan oldal (192.168.1.1).
Honlapok amik nem jönnek be:
www.nemzetisport.hu
www.experts-exchange.com
Ja és gmail -es leveleket sem lehet letölteni e-mail kliensel pop3-on. Különös, hogy más e-mail szolgátató meg megy.
#!/bin/sh
modprobe ip_tables
modprobe ip_conntrack
modprobe ipt_LOG
modprobe ipt_limit
modprobe ipt_state
modprobe ip_conntrack_ftp
modprobe ip_conntrack_irc
modprobe ipt_MASQUERADE
modprobe iptable_filter
modprobe iptable_nat
modprobe iptable_mangle
iptables -t filter -P INPUT ACCEPT
iptables -t filter -P OUTPUT ACCEPT
iptables -t filter -P FORWARD ACCEPT
iptables --flush
iptables -t nat --flush
iptables -t mangle --flush
iptables -t filter -P INPUT ACCEPT
iptables -t filter -P OUTPUT ACCEPT
iptables -t filter -P FORWARD ACCEPT
iptables -t nat -P PREROUTING ACCEPT
iptables -t nat -P POSTROUTING ACCEPT
iptables -t nat -P OUTPUT ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward
for i in /proc/sys/net/ipv4/conf/*/rp_filter ; do
echo 2 > $i
done
for i in /proc/sys/net/ipv4/conf/*/log_martians ; do
echo 1 > $i
done
echo 1 > /proc/sys/net/ipv4/tcp_syncookies
#iptables -t nat -A POSTROUTING -s 192.168.11.0/24 -j MASQUERADE
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
iptables -t filter -N ANTISPOOF
iptables -t filter -N SERVICES
iptables -t filter -N ICMP_FILTER
iptables -t filter -N TCP_CHECKS
iptables -t filter -N NET_COUNTER
iptables -t filter -A INPUT --in-interface ppp0 -j NET_COUNTER # munin net counter
iptables -t filter -A INPUT -j ICMP_FILTER
iptables -t filter -A INPUT -j ANTISPOOF
iptables -t filter -A INPUT -p tcp -j TCP_CHECKS
iptables -t filter -A INPUT --in-interface eth0 -d 192.168.1.1 -j ACCEPT # munin lan counter
iptables -t filter -A INPUT -j SERVICES
iptables -t filter -A INPUT --in-interface lo -j ACCEPT
iptables -t filter -A INPUT --in-interface eth0 -j ACCEPT
iptables -t filter -A INPUT --match state --state RELATED,ESTABLISHED -j ACCEPT
iptables -t filter -P INPUT DROP
iptables -t filter -A OUTPUT --out-interface ppp0 -j NET_COUNTER # munin net counter
iptables -t filter -A OUTPUT -s 192.168.1.1 # munin lan counter
iptables -t filter -P OUTPUT ACCEPT
iptables -t filter -A ANTISPOOF --source 127.0.0.0/8 --in-interface ! lo -j DROP
iptables -t filter -A SERVICES -p tcp --source-port 1024:65535 --destination-port 22 -j ACCEPT
iptables -t filter -A ICMP_FILTER -p icmp --icmp-type echo-request -j ACCEPT
iptables -t filter -A ICMP_FILTER -p icmp --icmp-type echo-reply -j ACCEPT
iptables -t filter -A ICMP_FILTER -p icmp --icmp-type host-unreachable -j ACCEPT
iptables -t filter -A ICMP_FILTER -p icmp --icmp-type network-unreachable -j ACCEPT
iptables -t filter -A TCP_CHECKS -p tcp --tcp-flags ALL NONE -j DROP
iptables -t filter -A TCP_CHECKS -p tcp --tcp-flags FIN,ACK FIN -j DROP
iptables -t filter -A TCP_CHECKS -p tcp --tcp-flags ACK,PSH PSH -j DROP
iptables -t filter -A TCP_CHECKS -p tcp --tcp-flags ACK,URG URG -j DROP
iptables -t filter -A TCP_CHECKS -p tcp --tcp-flags SYN,FIN SYN,FIN -j DROP
iptables -t filter -A TCP_CHECKS -p tcp --tcp-flags SYN,RST SYN,RST -j DROP
iptables -t filter -A TCP_CHECKS -p tcp --tcp-flags FIN,RST FIN,RST -j DROP
iptables -t filter -A TCP_CHECKS -p tcp --tcp-flags ALL FIN,PSH,URG -j DROP
exit 0
Előre is köszi a válaszokat.