# L2tp Vpn Possible over wwan Mobile Adapter?



## icinemagr (May 21, 2022)

Hi i am trying to make my laptop act as vpn server.
It has a sierra em/7455 adapter and i have public ip address from my provider

Is it possible to install any vpn server software and each client get the Public ip from my laptop?
Or if is not that possible.
is it possible to use my laptop as gateway for 1-2 windows clients so the have the mobile public ip address from my laptop?

Thank you anyway.


----------



## obsigna (May 21, 2022)

icinemagr said:


> Hi i am trying to make my laptop act as vpn server.
> It has a sierra em/7455 adapter and i have public ip address from my provider
> 
> Is it possible to install any vpn server software and each client get the Public ip from my laptop?
> ...


I am not sure whether the adapter works with FreeBSD. Does it come up in `# ifconfig`?

In case yes, you might want to follow my BLog post on how to setup a L2TP/IPsec VPN service by employing net/mpd5 (L2TP) and security/strongswan (IPsec) on a system operated by FreeBSD. The original post is in German, however the Google translater does a descent job to translate it to English. You only want to pick the configurations and settings from the original page, since these shouldn’t be translated:





						L2TP/IPsec-VPN-Einwahl auf den FreeBSD-Home-Server
					






					obsigna-com.translate.goog
				




In case said network adapter does not work with FreeBSD, then either forget it, or try your luck with an USB/ethernet dongle.


----------



## Phishfry (May 21, 2022)

Sierra MC7455 might work. It is newer than any Sierra's I have tried. There is MC7405 I think in usbdevs.
Sierra uses USB compositions for various cellular protocols.
So you might need to set cell module firmware to a USB Composition that FreeBSD will work with.
Poke at /dev/cuaU0.3 or cuaU0.2 with terminal and see if you can't find the AT command prompt.
Then probe with ATI

I would tackle this task in stages. Get cell modem up and running with carrier and PPP.
Then move to mpd5 like obsigna recommended. Then do VPN


----------



## Phishfry (May 21, 2022)

icinemagr said:


> is it possible to use my laptop as gateway for 1-2 windows clients so the have the mobile public ip address from my laptop?


Yes nothing technically to stop you.
But...
How do you disseminate an IP to these clients?
If Wifi you need to ensure your wireless module can act as a wireless access point. hostapd mode.
(Atheros N module. AC mode not supported)
If Ethernet you are fine.

Then it comes to how to issue IP's to these clients? Manually or DHCP.
Well you use your cellular connection as WAN with your ISP issued IP and then for clients you setup an internal network for the clients. Either wireless, wired or both.
For that you might want to use dns/dnsmasq as dns and dhcp server to your clients.
You will need a firewall behind your cellular connection. pfNAT to your clients and setup rules.
Basically the same setup as any router just using a wireless WAN instead of ethernet.

Maybe this should be your STEP1 of the project. Get your (laptop) router up with MPD5 and get a firewall started. Get your local clients connecting then attempt tunneling connections.

If you are not feeling confident of your skills then checkout pfSense or OPNSense.
You can achieve everything you want from a web GUI. All of it. Local wireless hotpot, local network, firewall.


----------



## Phishfry (May 22, 2022)

Ok here is the relevant snippet from /sys/dev/usb/usbdevs

```
product SIERRA MC7430        0x9071    Sierra Wireless MC7430 Qualcomm Snapdragon X7 LTE-A
```

So you need to have your modem composition in this mode: 9071
Sierra uses the PID (productID or idproduct) for different modes.

Looking at output from `usbconfig` will show PID (product) in use on the modem.


----------



## Phishfry (May 22, 2022)

The Sierra AT command set is pretty indepth.
It is password protected and that allows you to change modes.
at!entercnd="A710"
In this Linuxy post they show the use of the command prompt.








						How to use 4G LTE modems like the MC7455 on both Debian/Ubuntu and OpenWRT using MBIM
					

How to use 4G LTE modems like the MC7455 on both Debian/Ubuntu and OpenWRT using MBIM - lte_mbim_from_scratch.md




					gist.github.com
				




You may need to change composition with the Extended AT command set.
It depends on where the modem module came from as to how it is setup.
If it came from a Windows10 box it will probably need changing of mode.
QMI dont work on FreeBSD. So keep that in mind.
Ignore the text of the above as well. It is orientated to Linux protocols. Please don't follow those instructions.
I am simply showing what changing a usb composition looks like.
FreeBSD uses the DirectIP protocol and PPP. There may also be a way to get a ue0 connection with NCM.


----------

