New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
GRE tunnel on a BuyVM.net VPS for IP forwarding
I'm trying to set up a GRE tunnel on a BuyVM.net VPS for IP forwarding. It works perfectly on Ubuntu/Debian with this configuration:
ip tunnel add gre2 mode gre remote 192.0.2.100 local 203.0.113.50 ttl 255
ip addr add 12.16.10.1/24 dev gre2
ip link set gre2 up
ip route add 188.51.100.176/32 dev gre2
iptables -t nat -A POSTROUTING -s 12.16.10.0/24 -o eth0 -j MASQUERADE
However, when I use MikroTik RouterOS on the same VPS, the tunnel comes up, but IP forwarding doesn't work—no connectivity or routing through it. Here's the MikroTik config I'm using:
/interface gre add name=GRE local-address=203.0.113.50 remote-address=abc123xyz789.example.net
/ip address add address=12.16.10.1/24 interface=GRE
/routing table add name=GRE fib
/ip route add dst-address=188.51.100.176/32 gateway=GRE
/ip route add dst-address=0.0.0.0/0 gateway=GRE
/routing rule add src-address=188.51.100.176/32 interface=GRE action=lookup table=GRE
The tunnel establishes, but the IP (188.51.100.176/32) isn't being forwarded or reachable. Why does this work on Linux but fail on MikroTik? Could it be a NAT issue, routing table misconfiguration, or something specific to MikroTik's GRE implementation? Any suggestions for debugging or fixing this?

Comments
Did you remember to poke systctl and set
ip_forwardto 1 ?Francisco
yes it works on linux, but if I install mikrotik on it it doesn't work.
Is there no such IP forwarding on Mikrotik, or how should this be done?
MikroTik defaults to forwarding unless you have a drop rule in place. Might try disabling all forward rules temporarily and see if it comes up.
not working