Skip to main content

Update UXG WAN IP via SSH

Learn how to update the WAN IP address for a UXG via SSH

Alex Lowe avatar
Written by Alex Lowe
Updated over a week ago

Sometimes you might need to update the WAN IP address of a UXG device (UXG Lite, UXG Max, UXG Pro, UXG Fiber or UXG Enterprise) via SSH for a multitude of reasons.

For example, if you use a static IP address to connect to your ISP and this changes for any reason, you can easily update the WAN IP address without having to reset and readopt the UXG.

If you want fast and reliable UniFi hosting, check out HostiFi with fast support, regular backups, managed updates and prices from just $9 per month.

If you are interested in learning more about our hosting plans, create an account and get started today.

Update the UXG WAN via SSH

Thankfully, this can be done via SSH if required. To do this, first log into the UXG via SSH. Follow our guide here for more detailed instructions.

First, run ifconfig to check the list of interfaces.

ifconfig

Next, flush out the current IP address from the UXG. In this example, we used a UXG Lite, with eth1 being the WAN interface and eth0 being the LAN.

sudo ip addr flush dev eth1

Then, set a static IP address on the WAN port.

sudo ip addr add ipaddress/netmask dev eth1

Example

sudo ip addr add 172.18.38.5/24 dev eth1

Now, set the gateway IP address

sudo ip route add default via gatewayip dev eth1

Example

sudo ip route add default via 172.18.38.1 dev eth1

Once this is done, the UXG will connect back to the UniFi Controller. What is important to remember is that this configuration change is only temporary and will only be overwritten whenever the UXG reboots. So make sure to update the new WAN connection details within UniFi.

HostiFi

HostiFi provides hosting for both Ubiquiti and TP-Link software-defined-networking (SDN) applications, with servers for UniFi, UISP and Omada. We also offer professional networking consulting, with HostiFi Pro.

If you run into any issues, send an email to support@hostifi.com or contact us via live chat.

Did this answer your question?