We live in a very remote place where LTE and satellite internet are the only internet source available. We need to access web server from outside internet and of course the internet provider mentioned earlier doesn’t have any public IP address. We found a vendor who is renting out public IP address and deliver it using either L2TP or SSTP.
We configure L2TP in our mikrotik, it is connected and getting public IP address. However, we have no idea on how to port forward to web server which on LAN 192.168.10.10/24
Ideally, client access from outside will be using public IP and the rest of default traffic will be going out using LTE internet
How can I accomplish that? I have very limited experience here so need step by step instruction in order to accomplish it.
It’s simple, it’s like regular dual-WAN config. You can forward ports as usual and you just need to make sure that if request came from tunnel, response must go back the same way.
Minimal config for that is new default route in separate routing table:
/ip route
add dst-address=0.0.0.0/0 gateway=<IP address on the remote side of VPN tunnel> routing-mark=vpn
And yes, gateway should be the address on their side. If it’s really 1.0.0.1, then on one hand it’s completely wrong, because it’s public address that doesn’t belong to them, but if it’s there, it’s what you should use.
And yes, gateway should be the address on their side. If it’s really 1.0.0.1, then on one hand it’s completely wrong, because it’s public address that doesn’t belong to them, but if it’s there, it’s what you should use.
The L2TP works if I am using TP-Link WR840N Router to dial out and also notice the default gateway is also 1.0.0.1 on TP-Link router, so I know 1.0.0.1 should be working.
The Public IP is /32 for instance 129.129.129.10/32 and gateway could be something totally different like 55.56.57.51
I don’t know why they have that weird IP Public, but that’s how their network design. Even the IP is /32 and gateway is not same subnet as the IP, the IP is still route-able to internet.
Ok, stupid question, how much are you sure that your new public address does anything at all? If you use Tools->Torch on L2TP interface, what do you see there? Any traffic to or from 129.129.129.10?
You now have L2TP client with add-default-route=no, right? Can you test if it works when you change it to add-default-route=yes? It will route everything through VPN, but you’ll see if it works or not. If it does, you can switch it back.
I tried a quick test and L2TP interface works as gateway, so you don’t need to deal with IP address as gateway and you can use:
Can you test if it works when you change it to add-default-route=yes? It will route everything through VPN, but you’ll see if it works or not. If it does, you can switch it back.
/ip address
add address=1.1.1.115/24 interface=WAN network=1.1.1.0
/interface l2tp-client
add add-default-route=yes connect-to=xxx.com disabled=no max-mru=1500 max-mtu=1500 name=l2tp-out1 password=x user=x
/ip route
add distance=2 gateway=1.1.1.1
it works very well
please let me know if I helped
There are some missing pieces to understand the technical issue.
Who is behind the Mikrotik device?
What are the routes on the Mikrotik device?
/ip route print
Might help to understand.
What you technically need to do is add a dnat rule on the l2tp\sstp interface with the local address and the corresponding firewall rules in the filter table.
I cannot assume what is the technical setup regarding what is in the Mikrotik device.
If you would share more info, maybe via a supout.rif or other output from the device me or others might be able to assist you
And as a side note, a L2TP is a tunnel and should have /32 address, the Gateway for such a device is the device itself.
With the right settings you don’t need to add anything else then configuring the tunnel and the DHCP client properly.
(Assuming the TP-Link was good enough for you)
Since there was an example of a TP-Link working then it should be working the same on the Mikrotik device.
It’s not a DUAL-WAN scenario in the TP-Link since it’s converting the current default GW to the l2tp one.
In Mikrotik the only main issue with this L2TP connection is that it will not fetch the published DNS servers.