iptables -F iptables -X iptables -t nat -F iptables -t nat -X iptables -t mangle -F iptables -t mangle -X modprobe ip_conntrack modprobe ip_conntrack_ftp #Group 1 #iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 0:442 -j DNAT --to 192.168.0.44:3128 #iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 0:442 -j REDIRECT --to-port 3128 #iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 444:65535 -j DNAT --to 192.168.0.44:3128 #iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 444:65535 -j REDIRECT --to-port 3128 #iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -j DNAT --to 192.168.0.44:3129 #iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 443 -j REDIRECT --to-port 3129 #Group 2 #iptables -t nat -A PREROUTING -i eth0 -p tcp -j DNAT --to 192.168.0.44:3128 #iptables -t nat -A PREROUTING -i eth1 -p tcp -j REDIRECT --to-port 3128 #Group 3 #iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 0:442 -j REDIRECT --to-port 3128 #iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 444:65535 -j REDIRECT --to-port 3128 #iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 3129 #Group 4 #iptables -t nat -A PREROUTING -i eth0 -p tcp -j REDIRECT --to-port 3128