The below tutorial will walk you through altering the Web UI port on a Ubiquiti Edge Router Lite.
# Log into router via ssh/console
# Enter configure mode
{{{ lang=bash
configure
}}}
# Set the Web UI port; change `8443` to whatever you would like
{{{ lang=bash
set service gui https-port 8443
}}}
# Commit and save
{{{ lang=bash
commit
save
}}}
—–
//If you require access to the Web GUI from an external location, you will need to create a firewall rule to allow the traffic. //
# Create the firewall rule to allow inbound traffic on port 8443
{{{ lang=bash
edit firewall name WAN_LOCAL rule 50
set description “Inbound traffic to WEB GUI”
set action accept
set log disable
set protocol tcp_udp
set destination port 8443
}}}
Change WebUI Port – Ubiquiti EdgeRouter Lite
by
Tags:
Comments
23 responses to “Change WebUI Port – Ubiquiti EdgeRouter Lite”
-
While editing the template file will work, it’s better to just use the CLI to change it. No reboot required.
configure
set service gui https-port 8443
commit
save-
Awesome thank you; I have updated the post. +1 for Ubiquiti support!
-
-
Made the above changes to change the webgui port, can access the gui locally, but now cannot access the webGUI via the internet, is there something else that needs to be done?
-
Yes – you will need to create a firewall rule to allow inbound traffic on the specified port. I have updated the tutorial to reflect this.
-
Thanks, Worked like a charm
-
-
I made the same change and cannot get back into the router. How do you access GUI locally? Did you specify the port? I tried all combinations and can’t get back in. I don’t have my configuration backed up so I don’t want to reset the router. Any ideas?
-
Hi Stan – You should be able to access the UI by going to http://ROUTER_IP:8443
-
I followed the steps and I can’t figure out how to get back into the router either.
I can ssh but cannot get into the router GUI either thru Lan or Wan 443 or 8443?
-
-
-
-
Slight correction in the firewall rule.
Change:
edit firewall WAN_LOCAL rule 50To:
edit firewall name WAN_LOCAL rule 50-
Good catch, thanks for posting it! I went ahead and updated the article :)
-
-
Great article. I followed the steps and everything works great. I want to create a similar firewall rule to enable SSH remote management access. Would I just do something like this?:
edit firewall name WAN_LOCAL rule 60
set description “Inbound traffic to SSH Management”
set action accept
set log disable
set protocol tcp_udp
set destination port 22-
Great to hear that the tutorial worked! You are correct in regards to the creation of the new firewall rule, although I would recommend `set protocol tcp` instead of `tcp_udp` as SSH does not require UDP for operation ;)
-
Awesome! I throught the firewall rule on (and set the protocol to TCP only as suggested–duh!) and works like a charm. Love your EdgeRouter tutorials. Thanks!
-
LOL, I guess I was overly excited. “I threw the firewall rule on[…]”
-
-
-
-
How do I disable wan gui management?
-
In most setups, you should already have a firewall blocking access from the WAN. If you do not, you can use the rule above by switching `action accept` to `action deny`.
-
-
Hi, Dave! So I’ve just followed your guide to change the default port WebGUI port on my edgerouter, but i can’t seem to connect to it now via web. I can SSH into the device though. Here’s a copy of my firewall config, maybe I entered something wrong?
Thanks!
-
Actually, I’ve followed the steps posted by Stig, and that worked for me!
-
Well that was easy ;)
Glad you got it working!
-
-
-
Thanks for posting Dave, very helpful!
-
After folling this example I can only access the router locally with the port designation attached to the router ip. How do I reverse this since my backup config wont load?
-
Thank you very much for the post. It works great. Do you know how to set/enable the “service-gui” port in GUI also instead of CLI?
-
As far as I know, there is not a way to change the WebUI port from the WebUI itself. According to the forums (https://community.ubnt.com/t5/EdgeMAX/EdgeMax-Lite-Change-Web-GUI-Port-Access/m-p/1035879/highlight/true#M43723), it has been discussed but was not implemented.
-
Leave a Reply to Nick Cancel reply