I've followed the BuyVM Guide found here on creating a GRE Tunnel to protect my main server against DDOS attacks (http://wiki.buyvm.net/doku.php/gre_tunnel)

I've followed through this whole guide and the tunnel works thats fine, and even if I use the Interface gre0 to get the IP of the box it shows as the protected IP, but when any traffic passes through this it is assigned the local IP of the adapter ( rather then the origin IP it was originally requested from.

I have made sure that net.ipv4.ip_forward is set to 1 in the sysctrl.conf and I also setup the routing tables as shown in the guide, swapping the IP's to the ones I specified (,, but still cannot get it to work correctly.

Is there something I'm missing, and is the guide incorrect?

1 Answer 1


Src IP of a packet changes because of NAT. Check ip ru ls, ip ro ls or iptables -t nat -L -nv. Look for MASQUERADE, SNAT or map-to, either of which indicates NAT. Check an IP's route like ip ro get

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.