The other day while configuring a Asus RT-N16 wireless router we had installed DD-WRT software on I decided to turn off HTTP access to the web admin interface. After making this change I got pulled away to test something else and never tested it so I was surprised when I attempted to login today and I was unable to login to the DD-WRT web interface using HTTP or HTTPS. Turns out something was not allowing HTTPS to start and since I had disabled HTTP the wireless router was no longer listening on port 80 or port 443. Below is information on how to start Apache after logging into a wireless router running DD-WRT either via SSH or via telnet.
Start Apache From DD-WRT Command Line:
Luckily starting apache is fairly easy however you might not realize how to do it if you are used to using the init.d start scripts such as “/etc/init.d/httpd start” on various Linux operating systems. Use the example below to start Apache on your wireless router running DD-WRT.
- root@ddwrt:/# httpd -h /www
Notice above that once you enter the command there will not be any output on the CLI however you can verify that Apache is running by using netstat as shown in the below example.
Verify DD-WRT Apache Running By Using Netstat:
- root@ddwrt:/# netstat -an | grep 80
- tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
As you can see above apache is now listening on port 80 and you should be able to bring up the HTTP admin interface of DD-WRT.
Make sure that once you have logged into the web interface that you enable HTTP underneath Web Access located in the Administration sub section Management as shown in the below example image.
DD-WRT: Administration Management – Web Access – HTTP
After putting a check back in HTTP click the Save button followed by the Apply button the save and then apply the new setting. This will restart HTTP and guarantee you are not locked out. Next you should troubleshoot any issues with HTTPS so you don’t accidentally end up in this scenario again.