Emerging Member
Posts: 100
Registered: ‎09-03-2014
Kudos: 19
Solutions: 1

Re: Guide to disabling NAT on USG

This was supposed to be in the 5.7 GUI - We're on 5.10 now and no sign of it. Update, please?

New Member
Posts: 16
Registered: ‎08-03-2016
Kudos: 1

Re: Guide to disabling NAT on USG

By "manager" do you mean the unifi controller? If so, then that is where the entirety of this setup takes place. There isn't a need to hit the USG directly to disable NAT for a subnet or interface.

New Member
Posts: 4
Registered: ‎01-07-2017
Kudos: 2

Re: Guide to disabling NAT on USG

Yes, on the UniFi controller through the web interface, as a properly supported feature. A checkbox to turn off NAT isn’t rocket science.

New Member
Posts: 4
Registered: ‎01-08-2019

Re: Guide to disabling NAT on USG

 am using a USG-Pro.

I have a public subnet that I need to pass through to some servers, but I also need a local subnet for regular trafic.

In other words, I need to use LAN1 as my passthrough subnet x.y.z.160/28 and LAN2 to be an internal network 192.168.x.y/24.

 

What would my configuration need to be to have LAN1 be the passthrough and LAN2 be a 192 network still using NAT?

 

Thanks

Mike

New Member
Posts: 16
Registered: ‎08-03-2016
Kudos: 1

Re: Guide to disabling NAT on USG

It's in the thread. You create/edit the config.gateway.json in your site directory and specify the prefix to exclude from NAT (just replace x.x.x.x/x with your IP/netmask):

{
"service":{
"nat":{
"rule":{
"5999":{
"description":"disable nat",
"exclude":"''",
"outbound-interface":"eth2",
"protocol":"all",
"source":{
"address":"x.x.x.x/x"
},
"type":"masquerade"
}
}
}
}
}
Member
Posts: 112
Registered: ‎08-23-2017
Kudos: 1
Solutions: 2

Re: Guide to disabling NAT on USG

Will a json change will survive an update?


@shifty wrote:
It's in the thread. You create/edit the config.gateway.json in your site directory and specify the prefix to exclude from NAT (just replace x.x.x.x/x with your IP/netmask):

{
"service":{
"nat":{
"rule":{
"5999":{
"description":"disable nat",
"exclude":"''",
"outbound-interface":"eth2",
"protocol":"all",
"source":{
"address":"x.x.x.x/x"
},
"type":"masquerade"
}
}
}
}
}

 

New Member
Posts: 16
Registered: ‎08-03-2016
Kudos: 1

Re: Guide to disabling NAT on USG

I haven't tested it, but I would assume so. It certainly persists through other provisioning changes and functions through multiple USG firmware's and controller versions.
New Member
Posts: 28
Registered: ‎02-18-2016
Kudos: 14

Re: Guide to disabling NAT on USG


@UBNT-cmb wrote:

 UI and back end are in the works to expose NAT configuration in the controller...


Just a friendly reminder, about two years later...can Ubiquiti finally get this done?


@ejacksch wrote:

Yes, on the UniFi controller through the web interface, as a properly supported feature. A checkbox to turn off NAT isn’t rocket science.



One wouldn't think so!

New Member
Posts: 1
Registered: Sunday
Kudos: 1

Re: Guide to disabling NAT on USG

I’m brand new to the Ubiquiti / UniFi product line but I have to say that while I am extremely impressed with what I’ve seen of it so far (mostly in just reading the Specs, Guides & Forums, etc.) I’m astonished that this issue of putting the USG in Bridge Mode and/or simply disabling NAT via the GUI hasn’t been rectified yet, in fact I’m surprised that it wasn’t always there in the first place... but after 2 years of user requests it seems inexcusable...