OpenWrt Forum Archive

Topic: How can I change webif default listening ports?

The content of this topic has been archived on 18 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello. My ISP is blocking incoming port range 1-1024 so i can't access my webif interface from outside. I would like to change the default listening ports from 80 to 2280 and 443 to 22443. Can someone pls tell me where I can change these values?  I would also like to change ssh listening port for the same reason.
Thanks

Just change the port in the startup script and restart it. As for port 443, I cannot tell.

(Last edited by Borromini on 23 Aug 2007, 07:35)

Should be /etc/init.d/S**httpd ... I think.

Thanks. I changed the default port 80. But I would also like to change port 443 and openssh port from 22 to something else. Can someone help me with these? Thanks

Do you use OpenSSH on your router?

By default it is dropbear. Since this is plain wiki stuff (heck, even just the dropbear config), I'll let you figure out how to change the port yourself. You should have enough clues by now.

Indeed it is dropbear. I thought I use openssh smile. Can you please tell me which config file should i change to change the port? I would also like to change the SSL port 443 for my webif. Thanks

Thanks. I changed the dropbear port. I only need to change one more port and that's webif's ssl port 443. Does anyone know how this is done?

Anyone? I would appreciate a working answer. Thanks

What you could do is not change the HTTPS port (which is 443) but make the firewall translate the requests from your custom ports to a 443. That is a bit cleaner than hacking the webif setup (which does not seem to contain any option for changing the port at first sight).

Oh. Good idea !!! So basically u mean to forward the request coming to my custom port to the 443 port.

Yes, and deny direct access to port 443, so you don't have to change your application's behaviour. The same can be done for SSH for example.

The discussion might have continued from here.