WiFi to VPN

Hi all,

Thank you for that nice forum. I've been using FreeBSD now for 20 years.

I'm trying to use FreeBSD 14 as a WiFi access point to a VPN.

This is the configuration I have:

FreeBSD_init.PNG


And this is what I want to do:

FreeBSD_WIFI_TUN_VPN.PNG


Need: I need a WiFi access point that goes directly to the VPN.
My problem is: Proton VPN creates a tun0 interface. This tun0 is net layer number 3 (IP), and it's not possible to bridge that tun0 to the WiFi interface. Bridges are net layer number 2 (Ethernet).
Question: how is it possible to create the link between the tun0 and the WiFi interface ? I tried unsuccessfully with Netgraph.

Thank you for you help. I hope that all is clear in my post.
Best regards,
Cedric.
 
depends. if the proton end "NATs" everything (not only your vnps end ip) you don't.
Yes, depends....
I don’t have a completely clear understanding of how everything is configured.

>This tun0 is net layer number 3 (IP), and it's not possible to bridge that tun0 to the WiFi interface.
But reading this I think that NAT is needed here
 
Dear all,

Thank you for all your answers.

The tun0 is created by the Proton client. I can't get rid of it. It receives an IP from Proton.

The WiFi interface: I'm open to all kind of solutions:

- 1/ Receive a IP from Proton.
- 2/ Set an IP, and set up a DHCP server for the WiFi clients.
- 3/ Other solution ..!

Regards, and thank you very much.
 
first test if the vpn requires nat on your end
you can do this by connecting the vpn (and assuming the vpn sets the default route thru tun0)
curl --interface your.eth0.ip https://ipinfo.io/ip
curl --interface your.tun0.ip https://ipinfo.io/ip

if it shows your proton end ip for both curls then you don't need nat on tun0
if the first curl does not work you have to do nat
 
Back
Top