0

i'm having some problem here to create a GRE tunneling, it' theoretically simple, i have 2 clouds, one, with DDoS Protection, and another, without that. In my first cloud, it have DDoS, hosted in OVH, in my second, it have not DDoS, hosted in Scaleway allright, in the OVH VPS, i have just a Public IP, where venet0:0 contains the public IP. But, in the scaleway, i have a localIP and a public IP, which the public IP is not in any interface, Ie: i used this commands in the OVH VPS:

1.1.1.1 = Public OVH IP
2.2.2.2 = Public Scaleway IP
0.0.0.0 = Local Scaleway IP

iptunnel add gre1 mode gre local 1.1.1.1 remote 2.2.2.2 ttl 255
ip addr add 192.168.168.1/30 dev gre1
ip link set gre1 up

and used this commands in the scaleway server:

iptunnel add gre1 mode gre local 0.0.0.0 remote 1.1.1.1 ttl 255
ip addr add 192.168.168.2/30 dev gre1
ip link set gre1 up

i'm able to ping from scaleway to 192.168.168.1, and from ovh to 192.168.168.1, apparently, it's working, but, when i try to forward the traffic from OVH to sacaleway, doesn't work, what i'm doing wrong here?

iptables -t nat -A PREROUTING -d 1.1.1.1 -j DNAT --to-destination 192.168.168.2
iptables -A FORWARD -d 192.168.168.2 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT 

1 Answers1

0

Make sure IP forwarding is enabled in your OWH VPS:

echo "1" > /proc/sys/net/ipv4/ip_forward