r/Ubiquiti•
lycwolf

Issue with VPN resources (possibly NAT or related).

Now that a ton of people are working remote, I'm going to try and fix/resolve an issue I've had for a long time.

​

My home setup is 4G LTE Modem -> USG w. controller > network.

​

When I connect to my work VPN (GlobalProtect) I cannot access some resources. E.G. RDP to some systems will not work or only sometimes work. HTTPS access to some sites will not work. Etc.

​

When I tether to my phone OR the modem DIRECTLY there is no issue. All resources work as they should.

​

I've narrowed it down to some setting/config in the USG. If I connect the 4G Modem -> Cheap Netgear Router -> USG and have my work laptop (and VPN) connected to the cheap netgear router it works fine. I've also tested with a fully reset Edgerouter Lite and did a full rebuild on the USG with no luck.

​

I know that the 4G modem (via tmobile) is using a strict nat, and I'm hitting a double nat, BUT why does it work with other routers? So far it only happens when using a Ubiquiti router...

​

Any advice/help would be awesome. I'd rather not have to use this weird modem - router - router setup...

(I'll also say that I have NO alternative internet option. Unless I want Fiber for $1,400 a month)

Posted Apr 8, 2020, 6:55 PM UTC

08
gusgizmo•

Do those resources sit on addresses that overlap with your local network? #1 cause of issues and often one of the hardest things for admins to resolve without gnarly hacks like 1-1 NAT.

1
lycwolfOP•

I thought that too. They kind of do... but I can use my work VPN at a friend's place with the same USG setup (same possibly overlapping range) but not a LTE internet connection and it works fine.

I know the LTE modem uses strict NAT. But I'm perplexed as to what a cheap netgear router can do, that my USG nor Edgerouter can.

1
gusgizmo•

Ok I re-read and you are using palo alto global protect. Typical config is to try to setup an IPSEC tunnel, then fall back to SSL.

Do you have anything else running IPSEC on your network? The NAT helper for IPSec is only capable of mapping one tunnel per external IP. You don't necessarily need the NAT helper, as the tunnel can typically fall back to ESP UDP transport, so you might experiment with it on and off.

Just some info to get your wheels turning on differences between networks. The NAT helper definitely will not succeed on 4G due to carrier grade NAT, but probably will on the netgear router.

2
lycwolfOP•

When testing at one point, I had reset the USG to a new config, and plugged the work laptop directly into the USG. So it was Modem > USG > Laptop. That did not help. If I plug directly to the Modem > Laptop, it works fine (in both IP Passthrough mode and "router" mode. If I plug Modem > Cheapo Netgear Router > Laptop it also works fine.

​

I mostly deal with internal enterprise networking, so WAN stuff doesn't come up that much, especially NAT related things. I'll have to take a look at the GlobalProtect client settings to see what type of VPN it's using on the back end and see if that has anything to do with it.

​

Otherwise, I might as well setup some packet caps tomorrow and see where the communication breakdown is. I have a feeling that something in the NAT portion isn't getting through the USG because of how they configure it for security.... maybe.... no real idea yet.

1
gusgizmo•

TCP is pretty straightforward with NAT, but UDP varies greatly as it's not a stateful, you essentially have to invent state for it. Some apps don't appreciate certain types of mangling as it stops them from holepunching to receive UDP. I suspect that the USG is doing something along those lines and it's probably a firmware specific regression as other people complain about STUN not working with the USG on certain firmwares. Port forwarding specific UDP ports will probably fix your issue, I believe in your case 500 and 4501.

1
gusgizmo•

Even more specifically, do you have active hosts on your network on the IP's of resources that you are trying to request on the remote network? I've noticed anyconnect will work in an overlapping net, just not if there are devices on the IP's I'm trying to access.

What VPN client is this?

1
ditrone•

What about dns? Do you have a pihole running? Try setting your laptops dns server temporarily to 8.8.8.8

1
lycwolfOP•

No change there either. Prior to now when I rebuilt the entire network config, I plugged directly into the USG with no special DNS rules applied. Also, setting manually to Google or Cloudflare does not seem to help.

1