What's new

Protect WAN access removing "banners" or dinamically open/close WAN access

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

lmerega

Occasional Visitor
Hi all, I often have to work on my home router RT-N66U with Merlinwrt.
I had to open it using a non standard port, but I would like to have a more secure interface.
In fact it now shows the AsusWRT login screen.
I would like an anonymous login&password form.
Is there any way to implement it?

Alternatively, how could I enable/disable WAN accees using a script?

TIA

.luca
 
Use a VPN server instead.
 
I usually use SSH tunnel.
The problem is that some of PCs I use do not have access to all ports (so I cannot use the SSH port).
Moreover not all of them can use VPN SW...
 
The router's web server is a swiss cheese of security holes. People should never expose it to the WAN.
 
The router's web server is a swiss cheese of security holes. People should never expose it to the WAN.
I do understand and I totally agrre.
This is why I would like to open it on demand.
Is there a flag I can enable/disable in the http server and restart it using a cron job?

Thx again
 
Untested, but this should do the trick to enable it:

Code:
nvram set misc_http_x=1
service restart_httpd

Make sure you use HTTPS only, and move that to a different port than the default 8443 port.
 
Code:
nvram set misc_http_x=1
This sets the correct flag in NVRAM. I can see the flag on or off but when restarting httpd, the new setting is not working.
I have to lcick "Apply" to make it work.
I noticed that "Apply" button calls "startapply.htm" but I do not understand what startapply.htm does :(
 
This sets the correct flag in NVRAM. I can see the flag on or off but when restarting httpd, the new setting is not working.
I have to lcick "Apply" to make it work.
I noticed that "Apply" button calls "startapply.htm" but I do not understand what startapply.htm does :(

The only thing restarted by that webpage is time, upnp and httpd. So, just restarting httpd should work - the page processed when hitting Apply does not matter.

You might want to try also restarting the firewall, just in case:

Code:
service restart_firewall
 
Perfect!!!
Now I can start and stop WAN access sending an email.
Just to understand, you said:
The only thing restarted by that webpage is time, upnp and httpd
So why restarting the firewall did the trick?

TIA
 
So why restarting the firewall did the trick?
Because restarting the firewall is a subset of restarting upnp......and you need to restart the firewall to apply (or remove) the iptables rules that allow WAN access.
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top