iptables -t nat -I POSTROUTING -d 2.2.2.2 -p udp --dport 9999 -j SNAT --to-source 1.1.1.1
-A POSTROUTING -d 192.168.190.2 -p tcp -m tcp --dport 80 -j SNAT --to-source 192.168.190.1
-A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -d 192.168.190.2 -p tcp -m tcp --dport 80 -j ACCEPT
cat /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -s 10.0.0.0/24 ! -d 172.16.0.0/24 -o eth0 -j SNAT --to-source 208.77.188.166
iptables -t nat -A POSTROUTING -s 172.16.0.0/24 ! -d 10.0.0.0/24 -o eth0 -j SNAT --to-source 208.77.188.166
tcpdump -i tun0 -vnn host 82.119.129.210 -c 1000
tcpdump -i eth0 -vnn host 82.119.129.210 -c 1000
iptables -I INPUT 2 -p tcp --dport 22 -j LOG
iptables-save -c
ip6tables-save -c
tc filter add dev eth1 protocol ip parent 1:0 prio 25 u32 match \
ip sport 80 0xffff flowid 1:10
tc class add dev eth1 parent 1: classid 1:1 htb rate 100Mbit ceil 100Mbit
101 prov1
102 prov2
# ip rule add from all fwmark 0x1 lookup prov1
# ip rule add from all fwmark 0x2 lookup prov2
# iptables -t mangle -A PREROUTING -i vlan10 -m conntrack --ctstate NEW -j CONNMARK --set-mark 0x1
# iptables -t mangle -A PREROUTING -i vlan20 -m conntrack --ctstate NEW -j CONNMARK --set-mark 0x2
# iptables -t mangle -A PREROUTING -i eth0 -m conntrack --ctstate ESTABLISHED -j CONNMARK --restore-mark
# iptables -t nat -A PREROUTING -i vlan10 -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.1.10:80
# iptables -t nat -A PREROUTING -i vlan20 -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.1.10:80
# iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o vlan10 -j SNAT --to-source 176.x.x.x
# iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o vlan20 -j SNAT --to-source 212.y.y.y
# iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
# iptables -A FORWARD -p tcp -m tcp -d 192.168.1.10 --dport 80 -j ACCEPT
iptables-save
iptables -A INPUT -s BANNED_IP -j LOG
iptables -t nat -A PREROUTING -s BANNED_IP -j LOG