Yes, it works for me today too!
I have the script now and I'm reading through it. It looks like you put a heck of a lot of hard work into this. It is very organized and clean code. Thanks so much for sharing it.
I have not ever used a script on a router before. I have ssh access to my router and I can login. I can use sftp to transfer files easily. I can use nano. Beyond that, I have some really basic questions. I did not find a "how to get started with scripts" guide, although if there is one, I would like to read it.
My questions are:
- Do I need to have jffs enabled to use scripts? Answered below
- Where do I save this script? Answered below
- The part of the instructions that mention "/jffs/configs/dnsmasq.conf.add" are not clear to me at all. EDIT: I found a 2014 discussion here. And more general help here (asuswrt-merlin wiki).
- Where do I find some explanation of dhcp-option's? dnsmasq --help dhcp (more below)
- How do I enable it to start automatically? Probably answered below
- Is there a way to monitor and administer this functionality from the GUI once installed? (If not, that's OK. I'm just wondering.)
- could you give an example of the script invocation so that both 2.4GHz and 5GHz guests will only have Internet access (no LAN access) and will be on a separate subnet that I can easily exclude from the VPN tunnel? (I'm thinking that if the main subnet is 192.168.1.X, the guest subnet could be 192.168.2.X, for example.)
I'll try to answer some of my own questions: (EDIT: could not answer all of them.)
Regarding my first question, it appears that Asuswrt-Merlin enables jffs by default, in contrast to dd-wrt.
Code:
/tmp/home/root# ls /jffs/
cfg.json nmp_cl_json.js nvram openvpn ssl syslog.log-1
configs nmp_client_list nvram_war scripts syslog.log usericon
However, support for custom scripts must be enabled, under Administration -> System in the webui.
Where do I save this script? From the examples, it appears the file needs to be named
GuestSubnet (without extension) and saved in /jffs/scripts/. (Is it named
GuestSubnet or
GuestSubnet.sh?)
This part of the instructions is not clear to me:
Code:
# /jffs/configs/dnsmasq.conf.add:
#
# e.g.
#
# 2.4GHz Guest #1 uses DHCP pool 10.88.241.2 - 10.88.241.20 and OpenDNS/Google DNS
# interface=wl0.1
# dhcp-range=wl0.1,10.88.241.2,10.88.241.20,255.255.255.0,21600s
# dhcp-option=wl0.1,3,10.88.241.1
# dhcp-option=wl0.1,6,208.67.220.220,8.8.8.8
Where are those
dhcp-option's documented? Is "6" a code for DNS server, for example?
From the dnsmasq man page, the set of option-names known by dnsmasq can be discovered by running "
dnsmasq --help dhcp". For example, to set the default route option to 192.168.4.4, do
--dhcp-option=3,192.168.4.4 or
--dhcp-option = option:router, 192.168.4.4
If I add those lines to /jffs/configs/dnsmasq.conf.add, how does dnsmasq know that they apply only to the guest wifi clients?
How do I enable it to start automatically? I see that this will be done by virtue of "/'etc/dnsmasq.conf' by command 'service restart_dnsmasq' and
@boot time etc." It's not clear to me exactly how that happens, but I guess it will be clear once I know the answer to the above question.
An example command line for GuestSubnet specific to my use-case would be very helpful. Thank you.