Помогите разобраться с iptables. Нужно пустить одну машину в интернет не через прокси, а на прямую. сам скрипт.
# Generated by iptables-save v1.3.6 on Fri Jul 27 16:03:13 2007
*mangle
:PREROUTING ACCEPT [38202117:20265961694]
:INPUT ACCEPT [296590260:201106009696]
:FORWARD ACCEPT [2720039:1243794680]
:OUTPUT ACCEPT [33712485:33111151090]
:POSTROUTING ACCEPT [233354234:294909943362]
-A FORWARD -i eth1 -j MARK -d ! XX.XX.XX.XX/22 --set-mark 0x1
COMMIT
# Completed on Fri Jul 27 16:03:13 2007
# Generated by iptables-save v1.3.6 on Fri Jul 27 16:03:13 2007
*nat
:PREROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
-A POSTROUTING -d XX.XX.XX.XX -o tap+ -j SNAT --to-source XX.XX.XX.XX
-A POSTROUTING -o ppp10 -j MASQUERADE
-A POSTROUTING -o eth1 -j SNAT --to-source XX.XX.XX.XX
-A POSTROUTING -o eth2 -j SNAT --to-source XX.XX.XX.XX
-A PREROUTING -p tcp -m tcp ! -d XX.XX.XX.XX/22 --dport 80 -j REDIRECT --to-p$
COMMIT
# Completed on Fri Jul 27 16:03:13 2007
# Generated by iptables-save v1.3.6 on Fri Jul 27 16:03:13 2007
*filter
:INPUT DROP [0:0]
:OUTPUT ACCEPT [0:0]
:forward_to_inet - [0:0]
:FORWARD DROP [0:0]
:allowed - [0:0]
:tcp_packets_inet - [0:0]
:icmp_packets - [0:0]
:bad_tcp_packets - [0:0]
:tcp_packets_vpn - [0:0]
:tcp_packets_lan - [0:0]
-A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -s XX.XX.XX.XX/24 -i eth1 -j forward_to_inet
-A FORWARD -s XX.XX.XX.XX/22 -i eth0 -j forward_to_inet
-A allowed -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j ACCEPT
-A allowed -p tcp -m state --state RELATED,ESTABLISHED -j ACCEPT
-A allowed -p tcp -j DROP
-A bad_tcp_packets -p tcp -m tcp -m state --tcp-flags SYN,ACK SYN,ACK --state N$
-A bad_tcp_packets -p tcp -m tcp -m state ! --tcp-flags FIN,SYN,RST,ACK SYN --s$
-A forward_to_inet -s XX.XX.XX.XX/24 -p tcp -m tcp --dport 443 -j ACCEPT
-A forward_to_inet -s XX.XX.XX.XX/24 -p tcp -m tcp --dport 9091 -j ACCEPT
-A forward_to_inet -p tcp -m tcp --dport 80
-A forward_to_inet -p tcp -m tcp --dport 5190
-A forward_to_inet -p udp -m udp --dport 5190
-A forward_to_inet -p tcp -m tcp --dport 21
-A forward_to_inet -p tcp -m tcp -d XX.XX.XX.XX --dport 21 -j ACCEPT
-A forward_to_inet -p tcp -m tcp --dport 20
-A forward_to_inet -p tcp -m tcp --dport 25 -j ACCEPT
-A forward_to_inet -p tcp -m tcp --dport 110 -j ACCEPT
-A forward_to_inet -p tcp -m tcp --dport 1194 -j ACCEPT
-A forward_to_inet -p tcp -m tcp --dport 1935 -j ACCEPT
-A forward_to_inet -p tcp -m tcp --dport 5222
-A forward_to_inet -p udp -m udp --dport 5222
-A forward_to_inet -p tcp -m tcp --dport 5223
-A forward_to_inet -p udp -m udp --dport 5223
-A forward_to_inet -p tcp -m tcp --dport 53 -j ACCEPT
-A forward_to_inet -p udp -m udp --dport 53 -j ACCEPT
-A forward_to_inet -p tcp -m tcp --dport 143
-A forward_to_inet -p udp -m udp --dport 143
-A forward_to_inet -p tcp -m tcp --dport 995 -j ACCEPT
-A forward_to_inet -p udp -m udp --dport 995 -j ACCEPT
-A forward_to_inet -p tcp -m tcp --dport 8585 -j ACCEPT
-A forward_to_inet -p icmp -j ACCEPT
-A forward_to_inet -p tcp -m tcp --dport 10000
-A forward_to_inet -p udp -m udp --dport 1200 -j ACCEPT
-A forward_to_inet -p udp -j DROP
-A icmp_packets -p icmp -m icmp --icmp-type 11 -j ACCEPT
-A icmp_packets -p icmp -m icmp --icmp-type 8 -j ACCEPT
-A tcp_packets_inet -p tcp -m tcp -i eth0 --dport 22 -j allowed
-A tcp_packets_inet -p tcp -j DROP
-A tcp_packets_lan -j ACCEPT
-A tcp_packets_vpn -j allowed
-A forward_to_inet -p tcp -j DROP
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -s XX.XX.XX.XX -i lo -j ACCEPT
-A INPUT -s XX.XX.XX.XX -i lo -j ACCEPT
-A INPUT -s XX.XX.XX.XX -i lo -j ACCEPT
-A INPUT -p tcp -m tcp -s XX.XX.XX.XX/22 -i eth0 -j tcp_packets_lan
-A INPUT -p tcp -m tcp -s XX.XX.XX.XX/24 -i eth1 -j tcp_packets_lan
-A INPUT -p tcp -m tcp -i eth2 -j tcp_packets_inet
-A INPUT -p udp -m udp -s XX.XX.XX.XX/22 -i eth0 -j ACCEPT
-A INPUT -p udp -m udp -s XX.XX.XX.XX/24 -i eth1 -j ACCEPT
-A INPUT -s XX.XX.XX.XX/255.255.255.0 -i tap+ -j ACCEPT
-A INPUT -s XX.XX.XX.XX/255.255.255.0 -i tap+ -j ACCEPT
-A INPUT -s XX.XX.XX.XX/24 -i eth0 -j tcp_packets_vpn
-A INPUT -s XX.XX.XX.XX -i tap10 -j tcp_packets_vpn
-A INPUT -p icmp -j icmp_packets
COMMIT
# Completed on Fri Jul 27 16:03:13 2007