Client side CGNAT: no access to netgate
-
Hi all,
I am in San Sebastián, Spain. I want to access the pfSense dash on my netgate 2100 at home, in The Netherlands. So on my iPhone (while on cellular — CGNAT) I switch on the OpenVPN client instance and after a few seconds the connection is up. I can access some devices on the management VLAN such as UniFi dash. But I can not reach the Netgate. Not by IP and not by FQDN. I get the typical this server is not accessible error.
When I use the cottage WiFi I get the Netgate logon screen immediately. However, from a security perspective, I prefer cellular.My iPhone IP via cellular is 100.94.x.x. In town it’s 10.192.x.x
So what is going on here? Is the Netgate shy of client side CGNAT connections? Or am I missing something?
-
@Cabledude Show your OpenVPN rule?
I suppose it's possible your cell provider doesn't allow the VPN traffic...though I don't recall hearing that for VPN. Normally ISPs just block in- and/or outbound SMTP, or other inbound connections like a web server, if they block anything.
-
The IP of your phone could be anything, starting from (in between) 0.0.0.0 to 255.255.255.255 (with some exceptions).
You said you could access devices ion your pfSense LAN (interface).
A VLAN is just a special type of interface.My pfSense LAN is :

My OpenVPN server network is :

My OpenVPN Server firewall ruyle :

Plain English : everything from the OpenVPN server network (tunnel= 192.168.3.0/24) is allowed to access everything
My phone (no wifi) uses right now 92.184.110.129, some Orange (phone data carrier ISP).
When I start the OpenVPN client app on my phone, and I ask again "What is my IP?" I see this :
and that's the real, non-RFC1918 IPv4 pfSense WAN IP.
My phone uses of cousre another IP in the 192.168.3.x network, where192.168.3.1 is the IP of the VPN server.
My phone's IP is tight now :
where you can see again my phone's IP (192.184.110.129) and the tunnel IP used 192.168.3.20.
The the connection arrived at the VPN server, the traffic is 'inside' pfSense, so it can connect to the LAN interface, my 192.168.1.0/24.
You said it can connect to LAN devices like 192.168.1.a and 192.168.1.b.
Why wouldn't it be able to connect to 192.168.1.1 ?
When I fire up a browser and use "192.168.1.1:443" I see the pfSense web GUI right away.
I even don't need to type the port, :443 because TLS (https) is default these days.The silly part : show us your settings ... knowing that you can't actually access pfSense right now.
And you merit this free 'nag' : didn't you test your OpenVP server access before leaving home ?I'm pretty sure the issue isn't on your (phone) side. CGNAT or whatever, it doesn't matter.
Whatever Internet IP you use, you can access the pfSense OpenVPN server, and your pfSense LAN device.
That should include 192.168.1.1, pfSense LAN itself.@SteveITS said in Client side CGNAT: no access to netgate:
cell provider doesn't allow the VPN traffic
He can access pfSense LAN based devices.
So he is 'in'.
So he is connected to his pfSense OpenVPN server. -
TailScale will traverse CGNAT and even a neanderthal can set it up.
-
Thank you for replying.
Yes that is the weird thing, I’m in on the OpenVPN connection.
On this wiki I read the following:IETF published RFC 6598, detailing a shared address space for use in ISP CGN deployments that can handle the same network prefixes occurring both on inbound and outbound interfaces. ARIN returned address space to the Internet Assigned Numbers Authority (IANA) for this allocation.[4] The allocated address block is 100.64.0.0/10, i.e. IP addresses from 100.64.0.0 to 100.127.255.255.[5]
My iPhone receives an IP within that range.
I am aware of how the OpenVPN tunnel works. I agree that when I’m in I should be able to access any device in the subnets specified in the tunnel settings. And when I switch on WiFi everything works well. But I can assure you that only the Netgate box is totally unreachable when my iPhone is connected to an IP in the 100.64 ~ 100.127 range.
W
-
@Cabledude Oh I see, I thought you were saying you couldn't connect to the VPN. You've tried both the pfSense LAN and WAN IPs?
If you're already connected to the VPN, not sure I understand how the remote IP is relevant, but I don't disbelieve you. :)
You might look at Diagnostics > Routes. The other logical place is the OpenVPN firewall rules tab, or the interface tab if it's assigned.
-
@SteveITS said in Client side CGNAT: no access to netgate:
@Cabledude Oh I see, I thought you were saying you couldn't connect to the VPN. You've tried both the pfSense LAN and WAN IPs?
Not the WAN as I want to make a safe VPN connection. I tried the LAN IP and the FQDN which points to the LAN IP.
If you're already connected to the VPN, not sure I understand how the remote IP is relevant, but I don't disbelieve you. :)
I never thought it could be, either. And it probably isn’t. But I have no other way to explain it without going into the logs, which I can’t, because, well, I cannot connect to the GUI.
You might look at Diagnostics > Routes. The other logical place is the OpenVPN firewall rules tab, or the interface tab if it's assigned.
-
@Cabledude Well I was thinking "from the VPN" connect to the WAN but the normal routing of public IPs would probably fight you, yeah. Never mind.
Otherwise, in general, from LAN or another interface a rule allowing to "this firewall" would work for any IP on pfSense including WAN.
Can you try disabling WiFi on the phone, connect to VPN, and look at logs from your PC?
-
Hi Steve, thanks for your efforts! The situation is I’m in a house (cottage) on holiday with wifi that I don't own so must distrust until proven otherwise, hence the need to login using cellular. This has always worked wonders, but not here and now:
- iPhone with WiFi on and cell off: vpn tunnel is up and all devices can be accessed as if I was on my local network
- iPhone with WiFi off and cell on: vpn tunnel is up and all devices can be accessed as if I was on my local network, except the Netgate
Using possibly insecure WiFi to access my holiest place isn’t quite a beguiling perspective. So that is why I posted this, primarily to learn. I have no urgent issues going on with my Netgate at this time but having left my two teenage daughters at home for the duration of three weeks I want to be in control in case something should come up.
-
@Cabledude that really makes no sense at all - since your device would get IP on the same tunnel network.
So to pfsense the source would be no different. Lets say your tunnel network is 10.0.8.0/24 - believe this is default or something close to that.
So your device connecting to your pfsense vpn via pfsense public IP - lets call this 1.2.3.4.. If the tunnel comes up your device to pfsense will be 10.0.8.x what transport you use be it normal wifi or cell your still going over the tunnel and still to pfsense going to be some 10.0.8.x IP..
Now where have seen issues is say your trying to access pfsense on say its lan IP 192.168.1.1, and your vpn client is on some 192.168.1.0/24 network - where it wouldn't send that traffic down the tunnel at all since to the client 192.168.1.x is local. But you could access say your other devices if they on a different network/vlan say 192.168.2/24
One thing with cell that could be different is the mtu, and or also your source ip could be changing quite often and maybe your tunnel is going down. Can you even ping the IP of pfsense gui your wanting to access. Depending on your phone - you might need a app to do ping.. I use the HE network tool app for stuff like that. https://apps.apple.com/us/app/he-net-network-tools/id858241710
You might want to check your setting in your vpn server to allow the source IP to change.
edit: btw who is your cell carrier - seems really strange they would use cgnat.. Most all of them have moved to just using ipv6 for this connection that they translate to an ipv4 address when talking to ipv4 addresses on the internet.
-
@Cabledude said in Client side CGNAT: no access to netgate:
as if I was on my local network, except the Netgate
Is your pfSense LAN the default 192.168.1.0/24 or did you change it? I may have missed that above..
-
@chpalmer said in Client side CGNAT: no access to netgate:
@Cabledude said in Client side CGNAT: no access to netgate:
as if I was on my local network, except the Netgate
Is your pfSense LAN the default 192.168.1.0/24 or did you change it? I may have missed that above..
I changed it. But that shouldn’t make a difference. Please note that this setup has always worked and it works today when using WiFi on my iPhone. Just not using cellular.
-
@Cabledude I suggested the routes because that could explain the IP-specific behavior. It's still kind of a long shot though. Maybe if the pfSense WAN is CGNAT, or there's a static route?
-
@johnpoz said in Client side CGNAT: no access to netgate:
@Cabledude that really makes no sense at all - since your device would get IP on the same tunnel network.
I doesn't make sense at all indeed, glad we agree on that.
So to pfsense the source would be no different. Let's say your tunnel network is 10.0.8.0/24 - believe this is default or something close to that.
My tunnel network and home default LAN are completely different but let's stick to your assumptions
So your device connecting to your pfsense vpn via pfsense public IP - lets call this 1.2.3.4.. If the tunnel comes up your device to pfsense will be 10.0.8.x what transport you use be it normal wifi or cell your still going over the tunnel and still to pfsense going to be some 10.0.8.x IP..
Quite
Now where have seen issues is say your trying to access pfsense on say its lan IP 192.168.1.1, and your vpn client is on some 192.168.1.0/24 network - where it wouldn't send that traffic down the tunnel at all since to the client 192.168.1.x is local. But you could access say your other devices if they on a different network/vlan say 192.168.2/24
Yes I can access the other devices on the default LAN.
One thing with cell that could be different is the mtu, and or also your source ip could be changing quite often and maybe your tunnel is going down.
The MTU could be different for WiFi but since my OpenVPN tunnel works in other countries/areas when on cellular, it appears to be a moot point. Actually I keep getting the same cell lease on my iPhone. The tunnel is up al the time.
Can you even ping the IP of pfsense gui your wanting to access.
I have ping apps on my phone but for some reason it won't ping at all to the LAN at home.
So I disconnected the OpenVPN tunnel on my iPhone, tethered it to my laptop and opened the same tunnel on the laptop. I mean it's the same VPN Server that the phone uses. I used terminal to ping the hosts on the default LAN and I can ping the Netgate and I can ping the other devices.
Still can't connect to the Netgate though while tethered (thus on cellular)
You might want to check your setting in your vpn server to allow the source IP to change.
I cannot access the Netgate so I can't check any settings.
edit: btw who is your cell carrier - seems really strange they would use cgnat.. Most all of them have moved to just using ipv6 for this connection that they translate to an ipv4 address when talking to ipv4 addresses on the internet.
My cell carrier is Vodafone and I'm connected to Vodafone ES (Spain) atm.
I need to add that the browser keeps on trying for a very long time, more than a minute, to connect to the Netgate. Eventually it always gives up though.
Just to be 100% sure I did a dig on the FQDN that I use to connect to the Netgate and it resolves to the local IP of the Netgate.
-
@Cabledude said in Client side CGNAT: no access to netgate:
I changed it. But that shouldn’t make a difference.
I only mention it because if it somehow falls in the same subnet as the cell carrier CGNAT then the carrier could be causing issues that way. Shot in the dark..
-
@chpalmer said in Client side CGNAT: no access to netgate:
@Cabledude said in Client side CGNAT: no access to netgate:
I changed it. But that shouldn’t make a difference.
I only mention it because if it somehow falls in the same subnet as the cell carrier CGNAT then the carrier could be causing issues that way. Shot in the dark..
Good point. So far the subnets are quite different. But I will remember your post in case they should coincide
-
@Cabledude yeah really odd - if me I would sniff on your vpn interface on pfsense - do you see the traffic going to pfsense gui, do you see an answer? etc..
I sure can not duplicate it that is for sure, I just tried on my phone, turning off wifi and no issue access my pfsense gui at http://192.168.9.253:8443
-
@johnpoz said in Client side CGNAT: no access to netgate:
@Cabledude yeah really odd - if me I would sniff on your vpn interface on pfsense - do you see the traffic going to pfsense gui, do you see an answer? etc..
I sure can not duplicate it that is for sure, I just tried on my phone, turning off wifi and no issue access my pfsense gui at http://192.168.9.253:8443
Thank you for trying! All I can do is try to connect to the Netgate, write down the exact time and check later on when I regain access
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register LoginPrivacy Policy · Cookie Policy