PDA

Bekijk de volledige versie : Running dropbear on http port



RDF
02-02-2010, 14:13
Sometimes I'm behind a firewall that only allows outgoing traffic through port 80, which prevents me SSH access to my ASUS.

If I try to change dropbear to listen on port 80, I get this error:

dropbear[345]: Failed listening on '80': Error listening: Address already in use
dropbear[345]: premature exit: No listening ports available.

The problem seems to be the web GUI, which is listening on: 0 0.0.0.0:80.
How can I change the listening address of the WWW GUI?

I'm using 1.9.2.7-d-r740.

velcrow
03-02-2010, 15:11
Are you using a tunnel?

Don't think its the WebGUI as its ported to 8XXX from WAN? But you can kill the httpd process to test I suppose?

RDF
03-02-2010, 17:44
Hi, thanks for the reply!

No, I'm not using a tunnel.

The web GUI seems to listen on all adresses on port 80.

$ lsof -nP -i | grep httpd
httpd 40 root 5u IPv4 249 TCP *:80 (LISTEN)

I have no idea how to change the settings for the default httpd server. I remember I've tried this before...

lly
03-02-2010, 18:27
I have no idea how to change the settings for the default httpd server. I remember I've tried this before...
Just search this forum :p
http://wl500g.info/showthread.php?t=5606&highlight=http_lanport

RDF
03-02-2010, 20:12
Just search this forum :p
http://wl500g.info/showthread.php?t=5606&highlight=http_lanport

Thanks, and sorry for not searching carefully enough. :)

So I can set the httpd port by setting the "http_lanport" nvram variable.
But why is httpd listening on all addresses (0.0.0.0), if I'm just using http_lanport?
There's also a variable called http_wanport, which is set to none.

I can't find a variable for the listening address? Is there supposed to be a variable like http_listeningaddress? Or how to change it to listen just the LAN IP?

lly
03-02-2010, 20:29
Builtin httpd always listen on all interfaces, but incoming WAN connections is blocked in firewall by default. You have to learn iptables to know how it is working.

http_wanport variable used to forward some port from WAN (if it is enabled in web-UI) to http_lanport port.