On a Linux box, I have create a GRE tunnel called gre1 172.17.1 -> 172.17.2. The Linux box IP is 10.10.100.100, the end point IP is 10.10.101.101.
I am trying to do a source NAT (NOT destination NAT) to tunnel the traffic going from the Linux box to actually go to the tunnel is the destination port is 80. I have tried things along these lines without success:
iptables -t nat -A OUTPUT -p tcp --dport 80 -j SNAT --to 172.17.1.1 iptables -t nat -A FORWARD -p tcp --dport 80 -j SNAT --to 172.17.1.1
Most examples I found for GRE tunneling is for DNAT, not SNAT. Any example that would work for my case?