What's new
  • 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!

Example script for guest network

antohagg

New Around Here
I just got the TUF AX4200 (3.0.0.4.388_33506-gb8edbc3Revert) and was about to set up guest network, but unfortunately I saw that its not possible to set up guest network with my own specified Ip-range, nor was it possible to reserve ip-adresses for specified devices (MAC-adress). Also I wanted to specify one or two ethernet ports to be on the guest network only.
Since this router does not support merlin fw, is it possible to scrip this on the original fw?

Does anyone have an example script I could start with?

What I want is basicly a guest network (wifi 2.4 and 5GHz + 2 ethernet ports) with a custom ip-range, that is isolated from my main network (devices within the guest network should be able to comunicate with eachother). I only have this router and it is in router mode.

Thanks in advance!
 
Thanks, but was hoping I could stay on the stock fw, just with some scrips to set up the guest network instead of using the gui.
 
What you want to do won't survive reboot on stock Asuswrt.
 
What you want to do won't survive reboot on stock Asuswrt.
Was reading about USB-method described here, will this work?
 
Was reading about USB-method described here, will this work?
No, that method of running scripts on stock firmware has been removed by Asus.
 
Seems like this method uses the same usbmount trick and it doesn't work anymore.
 
After a bit of google, it looks like there is a workaround. :)
Haven't tried it but looks like it is going to work.
You'd have to use the workaround described in the installation instructions on that page.
 
Thats a sucks. I guess i'm left with having to configure it manually after each reboot.

Any idea how to set up the script?

/A
Note that if you really want to set up a new guest network, you will need to perform brctl and ifconfig commands to create/update the virtual bridge, modify the dnsmasq configuration to support the new ip range with dns and dhcp, and iptables commands to update the firewall rules. I've done that with Merlin but have no idea how one would do that with stock firmware.
 
This is MediaTek hardware, not sure if brctl is used or even present.
 
Note that if you really want to set up a new guest network, you will need to perform brctl and eifconfig commands to create/update the virtual bridge, modify the dnsmasq configuration to support the new ip range with dns and dhcp, and iptables commands to update the firewall rules. I've done that with Merlin but have no idea how one would do that with stock firmware.
Nice, if you have time, would you mind sharing some examples and I can work it out from there.
 
Nice, if you have time, would you mind sharing some examples and I can work it out from there.
No problem. I think most of what you need (assuming you can make it work with your model) is here: Post

Note you would need to also add the wireless interface to the bridge as I just made a wired-only guest network in this post.
 
You are lucky @antohagg to have OpenWrt supported hardware and trying to reinvent the wheel. 🤷‍♂️
 

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!
Back
Top