currently the switch on the slate can only be set to turn on or of the VPN settings, which to my opinion is a security risk for a travel router, as if it gets lost, anybody would have access to the VPN without any effort. Also, to my opinion a reboot should automatically turn of VPN connection (for the same reason).
Are there plans to add other options for the switch in the gui?
The switch is “No function (default)” by default, right? You can modify /usr/bin/switchaction to change switch action. You requiremet to turn off VPN when reboot done can be run in /etc/rc.local.
First and foremost I prefer options, which I can set in the gui, so that it best case these settings survive a firmware update. Otherwise I have to keep an information about all manual changes to re set them after update.
For me useful would be a switch for bridge mode on/off, just to name one example.
Do you know if there’s a way to use the physical switch to swap between router and WAP modes? I bought this router as a replacement to a little pocket WAP I had for years, as it’s really handy for the work I do to be able to plug in to a client’s network on a secure SSID, while still remaining on their local segment. Obvs, the router function is going to… break that ability and instead assign me my own address itself. But that’s not entirely useless, just useless for my job.
AFAIK, the only way to get this device into WAP mode requires a factory reset to get it back out, and all the searching I’ve done has turned up little to nothing with this specific request. But I don’t see why it shouldn’t be possible, I just have no idea what variables to change to what to make it happen.
@landshrk
If you press the reset button 3 sec (power led flashing the fourth time) you can get back to router mode. Somewhere in the /usr/bin/button_released is the script doing this.
If you find that part, you could copy it to a new file in /usr/bin/(example:router_off) and execute that file by adding router_off to the /usr/bin/switchaction.
Haven’t found the scripts that enable other modes (like extender or bridge) but if you find them you could do the same as mentioned above.
Thanks! That makes sense, now that you point it out. Looks like I’ll have to go digging for that information, maybe when I’m not just a little bored at work.
These two function is to setup router or ap mode, you can add them to /usr/bin/switchaction in proper place and have a try.
mode_ap(){
uci set dhcp.lan.ignore=1
uci set glconfig.bridge=service
uci set glconfig.bridge.mode=ap
uci set network.lan.proto='dhcp'
uci set network.wan.ifname=''
uci set network.lan.ifname='eth0.0 eth0.1'
uci commit
}
mode_router(){
uci set dhcp.lan.ignore=0
uci delete glconfig.bridge
uci set network.lan.proto='static'
uci set network.wan.ifname='eth0.1'
uci set network.lan.ifname='eth0.0'
uci commit
}
What I meant is, if I do as per your code above, when I enable mode_ap() - all the 3 ethernet ports become LAN. and when I enable mode_router(),1st ethernet port is in WAN mode and other 2 ethernet ports in LAN mode. am I correct ?
Yes and no. Adding options to the gui was the initial reason I opened the thread and I am pretty sure, with enough messing around, you could add it to that menu. But it will involve less steps if you add it via ssh. And in both cases it will most likely have to be re-done manually after a firmware-upgrade.