OpenWrt Forum Archive

Topic: How to enable the web UI on trunk (20110925)

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

I've inatalled trunk on my wr1043nd and now there's no web II.
How to enable it?

opkg update
opkg install luci
/etc/init.d/uhttpd enable
/etc/init.d/uhttpd start

(Last edited by written_direcon on 27 Sep 2011, 09:58)

... this means that I need to bring it online manually.
Which is why I'm trying to enable the web UI ...

there in no web UI , you must install it first smile

rolf2 wrote:

there in no web UI , you must install it first smile

There's also no PPPOE. Which will make it a little bit harder then expected.
Any hint?

OK. I got it.

uci set network.wan.proto=pppoe
uci set network.wan.username=username
uci set network.wan.password=password
uci commit
/etc/init.d/network restart

Just a question.
Why on earth trunk has the web UI disabled by default?

...download needed packages with PC , transfer them to router /tmp , and install from there ? smile

I need to have HTTPS web UI on wan.
I installed uhttpd-mod-tls but cannot see any option in the web UI.

Probably to ward off non-knowledgeable users.

Been that way for years... but hey, might as well build it yourself if you want to go trunk. That's how I do it.

uqbar: uhttpd on https documentation is all here. http://wiki.openwrt.org/doc/uci/uhttpd

Can't guide you through it, I have no clue.

(Last edited by blindbox on 27 Sep 2011, 16:30)

uqbar wrote:

I need to have HTTPS web UI on wan.
I installed uhttpd-mod-tls but cannot see any option in the web UI.

1) Change the listen_http list to the LAN IP address (uci get network.lan.ipaddr, e. g. 192.168.1.1:80). Binds HTTP access only to LAN network. HTTPS access is accessible on LAN and WAN.
/etc/config/uhttpd

config 'uhttpd' 'main'

    # HTTP listen addresses, multiple allowed
    list 'listen_http'    '192.168.1.1:80'
#    list 'listen_http'    '[::]:80'

    # HTTPS listen addresses, multiple allowed
    list 'listen_https'    '0.0.0.0:443'
#    list 'listen_https'    '[::]:443'
[..]

2) Add the Web server rule in the firewall configuration to open port 443/TCP on the router.
/etc/config/firewall

[..]
config 'rule'
        option '_name'        'Web server (HTTPS)'
        option 'src'          'wan'
        option 'dest_port'    '443'
        option 'target'       'ACCEPT'
        option 'proto'        'tcp'

3) restart the uHTTPd and the firewall

/etc/init.d/uhttpd restart
/etc/init.d/firewall restart

4) Test from outside of your LAN.

(Last edited by written_direcon on 27 Sep 2011, 16:45)

Thanks.
I think I need to fix the firewall part with port 443, though.

Right. In the firewall rule. I edited my post.

In the firewall configuration I read:

config 'rule'
        option 'src' 'wan'
        option 'proto' 'udp'
        option 'dest_port' '68'
        option 'target' 'ACCEPT'
        option 'family' 'ipv4'

Which should be BBOTP client from WAN.
Does this make any sense?

written_direcon wrote:
uqbar wrote:

I need to have HTTPS web UI on wan.
I installed uhttpd-mod-tls but cannot see any option in the web UI.

1) Change the listen_http list to the LAN IP address (uci get network.lan.ipaddr, e. g. 192.168.1.1:80). Binds HTTP access only to LAN network. HTTPS access is accessible on LAN and WAN.
/etc/config/uhttpd

config 'uhttpd' 'main'

    # HTTP listen addresses, multiple allowed
    list 'listen_http'    '192.168.1.1:80'
#    list 'listen_http'    '[::]:80'

    # HTTPS listen addresses, multiple allowed
    list 'listen_https'    '0.0.0.0:443'
#    list 'listen_https'    '[::]:443'
[..]

2) Add the Web server rule in the firewall configuration to open port 443/TCP on the router.
/etc/config/firewall

[..]
config 'rule'
        option '_name'        'Web server (HTTPS)'
        option 'src'          'wan'
        option 'dest_port'    '443'
        option 'target'       'ACCEPT'
        option 'proto'        'tcp'

3) restart the uHTTPd and the firewall

/etc/init.d/uhttpd restart
/etc/init.d/firewall restart

4) Test from outside of your LAN.

/etc/config/uhttpd was already OK.
Instead I preferred the web UI way and used the Firewall/Redirects to redirect wan:443 to lan:443.
Anyway, a more friendly web UI (a-la DD_WRT) will help a lot.

The discussion might have continued from here.