FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
662 views 1 comments
by
Hello,

I am trying to setup a GRE tunnel over the WAN port between an RUT240 and a remote node (which is running Ubuntu 18.04). The local WAN IP is 192.168.0.13. The remote WAN IP is 192.168.0.7. The subnet on the remote side is 192.168.101.0/24. The subnet on the local side is 192.168.54.0/24.

I can log into the RUT240 and manually issue the following commands:

ip tunnel add tun-gre0 mode gre remote 192.168.0.7 local 192.168.0.13
ifconfig tun-gre0 up
ip route add 192.168.101.0/24 dev tun-gre0

And this works great. However, I would like to configure this either via the Web Interface, or perhaps by manually editing the /etc/config/network, and I have not been successful with either approach. Any suggestions on how to configure the equivalent of this tunnel via the GUI or in /etc/config/network?

Alternatively, can I place this configuration in /etc/rc.local and have it work? Would it work if the WAN interface (PPP) takes a while to come up?

Thank you.

1 Answer

0 votes
by anonymous

Hello,

What FW version are you using, because in RUT2XX_R_00.1.12.2 there is GRE tunnel configuration via Web interface if you would go to Services > VPN > GRE Tunnel and configure it there.

Best regards,
VidasKac.

by
Hello,

I am indeed using the 1.12.2 firmware (although I notice there is now the 1.12.3 out). I have tried for several hours to configure the tunnel using the GUI via Services > VPN > GRE Tunnel, but have not been successful.

Note that the other end of my tunnel is not a Teltonika RUT240, but a Raspberry Pi running Ubuntu 18.04 with a USB LTE Dongle (so, the configuration is not uniform). Also note that on the Raspberry Pi end, I do not assign an IP address to the tunnel interface (i.e., there is no network such as 10.0.0.0 with .1 on one end and .2 on the other, as your examples show).

After some more digging, here is what I have been able to find. When I use the GUI to create the GRE tunnel and name it, in my case, MSA, a couple of things happen. First, there is an interface created called gre4-MSA and another interface called gre4-MSA_STATIC. The command ip tunnel show also shows the tunnel as gre4-MSA. When I add the routes to the remote network via the GUI, these routes are added to the gre4-MSA_STATIC interface, which in-turn seems to point to the gre4-MSA interface.

And this simply does not seem to work!

What is even more interesting, is that if I change the cli commands I was using successfully in my original post, and change the name of the tunnel from tun-gre0 to gre-tun or gre4-tun, even the cli commands don't work. So, my best guess is that the OS is somehow interpreting the name of the tunnel and the fact that it begins with gre and does something different?

This is really strange behavior and I am hoping that someone can explain what I am doing wrong and how to fix it.

By the way, I have been trying a variety of these WAN router devices, and I have had no issues with Cradlepoint (IBR350 and IBR650) and with a Sierra Wireless (ES450). And, as I mentioned, if I use the CLI and configure the tunnel as in my original post, the RUT240 works just fine as well. It would be nice to know how to configure it either using the GUI or the config files, so that the config would be persistent.

Thank you.