IPTABLE Redirect Traffic

By | 30/01/2018
1
2
3
4
5
iptables -t nat -A PREROUTING -p tcp --dport 53 -j DNAT --to-destination 8.8.8.8
iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 8.8.8.8
iptables -t nat -A PREROUTING -p tcp --dport 3306 -j DNAT --to-destination 8.8.8.8
iptables -t nat -A POSTROUTING -j MASQUERADE
echo "1" > /proc/sys/net/ipv4/ip_forward

8.8.8.8 คือ IP ปลายทาง

ใส่ความเห็น