## CREATE GRE TUNNEL
modprobe ip_gre
echo 1 > /proc/sys/net/ipv4/ip_forward
ip tu add zen mode gre remote 10.66.63.5 local 10.66.63.21 ttl 128
ip ad ad dev zen 172.17.0.41 peer 172.17.0.42/30
ip li set zen up
#iptables -I POSTROUTING -o zen -j MASQUERADE
ip tu ls zen
ip ad ls zen
ping 172.17.0.42 -c 5
### IPTABLE RULE TO FORWARD TRAFFIC THROUGH GRE
iptables -F
iptables -I OUTPUT -t nat -p tcp -s 10.37.144.130 -m multiport --dport 80,443,9401 -j DNAT --to 172.17.0.58
No comments:
Post a Comment