[Asus RT-N18U] Problems with Guest Network after Reboot

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
blacklionpt
DD-WRT Novice


Joined: 14 Apr 2017
Posts: 10

PostPosted: Mon Nov 26, 2018 15:13    Post subject: [Asus RT-N18U] Problems with Guest Network after Reboot Reply with quote
Hello everyone.

I've recently bought this router (Asus RT-N18U) and have been since configuring it with DD-WRT.

However, I’ve stumbled upon an issue I can't seem to quite solve:

After configuring the Guest Network following the DD WRT Guide, the Wireless Network will work properly as expected. However, if i reboot the router, no device can connect to the network. As far as i can tell, the router can't even provide an IP address to the device.

Here's the weird part: If I change any option in the wireless settings (For example: The name of the network, AP Isolation, etc.) and apply, the network immediately starts working just fine.

Anyone else with a similar issue?

I tested a few builds, mainly:

- r35667
- r36330
- r37837

Got the builds from here: https://download1.dd-wrt.com/dd-wrtv2/downloads/betas/2018/

Additionally, I did the following tests:

- Configured the DHCP-Server using DNSMasq instead of the GUI option;
- Configured the NAT and NET INSULATION rules directly on the Firewall Startup commands;
- Disabled the AP Insulation.

None of these tests worked, after rebooting the router the guest network will simply not work. The only situation where it worked was keeping it bridged with the internal LAN network, this way it worked after reboot.

Any help would be greatly appreciated.

Thank you for your time.
Sponsor
blacklionpt
DD-WRT Novice


Joined: 14 Apr 2017
Posts: 10

PostPosted: Wed Nov 28, 2018 16:32    Post subject: Reply with quote
Hello everyone.

I did not find out why this happens, however I did find a workaround to make sure it works after booting.

Turns out, after further testing, that it's not needed to change any settings at all in the Web Interface: All you need to do is press "Apply Settings" and the router will automagicly restart something in the services and the Guest Network will start working normally until next reboot.

I tried to simulate the "Apply Settings" in various ways, but none worked.

Just to help someone with the same problem go faster, here's the commands i tried running using telnet / run commands (These did nothing):

# Try 1:
- wl radio off
- wl radio on

# Try 2:
- wl down
- wl up

# Try 3:
- wl -i wl0 down
- sleep 3
- wl -i wl0 up

#Try 4:
- stopservice wland
- startservice wland

#Try 5:
- stopservice dnsmasq
- startservice dnsmasq

Now onto the workaround:

Since i could not figure out what commands the "Apply Settings" button runs, i figured: why not make the router press the button itself?

To archive this, i used curl, and Google Chrome to obtain the CURL URL. Here's the Step-by-Step i did to get the router to "press" the "Apply Settings" button automatically. It will "press" it 20 seconds after startup (so it waits a little while for everything to load up before "pressing" it):

1 - Open the Router Page, go to Wireless Settings;
2 - On Google Chrome, Enable "Developer Tools";
3 - Still on Chrome, go to the "Network" tab under the Developer Tools;
4 - Click on the option "Preserve Log";
5 - Press the Apply Button:
6 - Wait for the router to apply the settings.
7 - On the list, you should see various elements being loaded. Find the element called "apply.cgi"
8 - Rightclick "apply.cgi" and select "Copy" and then "Copy as cURL (BASH)".

On Notepad, paste the URL you just copied. You can clean it up a little bit before using it if you want. I cleaned mine like this:

Code:
curl 'https://192.168.1.254/apply.cgi' -H 'Connection: keep-alive' -H 'Cache-Control: max-age=0' -H 'Authorization: Basic YOUR_ENCRYPTED_KEY_WILL_SHOW_HERE' -H 'Origin: https://192.168.1.254' -H 'Upgrade-Insecure-Requests: 1' -H 'Content-Type: application/x-www-form-urlencoded' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8' -H 'Referer: https://192.168.1.254/Wireless_Basic.asp' -H 'Accept-Encoding: gzip, deflate, br' -H 'Accept-Language: pt-PT,pt;q=0.9,en-US;q=0.8,en;q=0.7' --data 'submit_button=Wireless_Basic&action=ApplyTake&change_action=gozila_cgi&submit_type=save' --compressed --insecure


Basically, I deleted everything after submit_type=save' the bold part up until --compressed

9 - Go to Administration >> Commands
10 - Edit the "Startup" commands, and insert:

Code:
sleep 20
<Your cURL in a single line>


And that's it! 20 Seconds after the router boots up it will "Apply Settings" automatically and fix all the weird issues with the Guest Network!

Hope this helps someone in need.

If someone somehow figures out what causes the original issue, please share your findings here so we can help improve this amazing project Smile
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14217
Location: Texas, USA

PostPosted: Wed Nov 28, 2018 17:05    Post subject: Reply with quote
Good info, but have you tried the current build (36860) yet without your workaround?
blacklionpt
DD-WRT Novice


Joined: 14 Apr 2017
Posts: 10

PostPosted: Wed Nov 28, 2018 17:31    Post subject: Reply with quote
Hello kernel-panic69.

I Didn't notice a newer build came up. I will test and will report back as soon as i can Smile
jwh7
DD-WRT Guru


Joined: 25 Oct 2013
Posts: 2670
Location: Indy

PostPosted: Thu Nov 29, 2018 16:17    Post subject: Reply with quote
blacklionpt wrote:
Here's the weird part: If I change any option in the wireless settings (For example: The name of the network, AP Isolation, etc.) and apply, the network immediately starts working just fine.

Anyone else with a similar issue?
Yes, this has been ongoing for some time, in all the build threads and many separate ones too. Smile
blacklionpt wrote:
I did not find out why this happens, however I did find a workaround to make sure it works after booting.
There have a been a couple workarounds for a while, e.g. from the build threads. Did you try those as well? I've been using:
    sleep 10;stopservice nas;stopservice wlconf;startservice wlconf;startservice nas
I.e. restarting wlconf needs nested inside the nas restart.

Thanks for your info on using browser dev tools though. Smile

Btw, jrscs already reported in the 37860 thread, for a k4.4 (ARM) model, that the VAP workaround is still needed. Sad

_________________
# NAT/SFE/CTF: limited speed w/ DD # Repeater issues # DD-WRT info: FAQ, Builds, Types, Modes, Changes, Demo #
OPNsense x64 5050e ITX|DD: DIR-810L, 2*EA6900@1GHz, R6300v1, RT-N66U@663, WNDR4000@533, E1500@353,
WRT54G{Lv1.1,Sv6}@250
|FreshTomato: F7D8302@532|OpenWRT: F9K1119v1, RT-ACRH13, R6220, WNDR3700v4
blacklionpt
DD-WRT Novice


Joined: 14 Apr 2017
Posts: 10

PostPosted: Tue Mar 26, 2019 15:10    Post subject: Reply with quote
Hello everyone!

Just an update on this issue: The issue is still present, however in the latest build (r39267) my fix no longer works.


In my case, even the fix jwh7 presented also didn't work, but I'm not sure if it is the same issue or not (i say this because in this latest build, after hitting apply or applying the fix bmentioned before, the wireless networks just disappear from all devices (all except the main one).

This was tested using 3 Wireless Networks (1 Internal, 1 Guest, 1 Separate for testing).

Latest builds do seem a lot unstable for my setups. For this particular router, i ended up with the build r34411 for now, as everything seems to work mostly smoothly!
mwchang
DD-WRT Guru


Joined: 26 Mar 2013
Posts: 1857
Location: Hung Hom, Hong Kong

PostPosted: Tue Mar 26, 2019 15:59    Post subject: Reply with quote
blacklionpt wrote:
Latest builds do seem a lot unstable for my setups. For this particular router, i ended up with the build r34411 for now, as everything seems to work mostly smoothly!

Would using multiple WLANs with AP isolation be a better solution?

_________________
Router: Asus RT-N18U (rev. A1)

Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!

Facebook: https://www.facebook.com/changmanwai
Website: https://sites.google.com/site/changmw
SETI@Home profile: http://setiathome.berkeley.edu/view_profile.php?userid=211832
GitHub: https://github.com/changmw/changmw
blacklionpt
DD-WRT Novice


Joined: 14 Apr 2017
Posts: 10

PostPosted: Tue Mar 26, 2019 17:20    Post subject: Reply with quote
Hello mwchang!

This setup i'm referring to is one of many i use. This specific one involves having 2 separate LAN networks, as well as 3 different AP networks.

Basically, LAN 1 and LAN 2 are to separate two working environments. The third connecting (Guest AP) is configured just like that: AP Isolation, NET Insulation, and a few more rules to prevent it from using other DNS servers than the specified ones, as well as prevent it from accessing the WAN subnet.

I also have several other setups with different requirements, for example:

1 of the setups (at home) runs some 15 Atheros based ones WR841N in a somewhat huge LAN i've built at home along with the neighbors
Other one is using two ASUS RT-N18U to provide a VPN tunnel between two points.

I have submitted a "status report" in the changelog thread. Here's hoping i can help sort the issue out on this router Smile
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum