I thinking about dual use scenarios for travel router. But it should be easy to config and switching between to use mode.
Mode 1 - is a travel router with remote access to home. By goodcloud, wireguard, astronode, it
doesn't matter how to do it. I have public IP at home, so is no problem.
Mode 2 - Is a load balanced second wan for home network. so we need auto switch off wifi and share internet to main router by Ethernet. Main router should know that not route VPN connection back to travel route by WAN 1, or just disable VPN is router is on WAN 2.
Do you think that config is possible to do?
It can be done by gl.inet web interface or is necessary go to LUCI, or worst case SSH?
There is no built-in one-click option to switch between these two modes.
As a workaround, you can configure the router for each mode separately and export a backup of each configuration. When you need to switch modes, you can restore the corresponding backup through LuCI.
Backup config is not a good option to do it. Maybe for someone who travel 2 time per year, but then no need mudi 7.. (By the way, backup/restore config by GL.inet interface should be in "future request")
Returning to the main topic, I understand there's no ready-made solution. I was thinking about creating some custom settings using the LUCI/SSH/GL.inet interface for easy switching in the future.
MUDI v2 and other router was a Toggle Button where is possible to set some function like on/off wireguard client or enable wifi. Unfortunately Mudi 7 don't have it (why even soft button on screen?), but it could be good start. If we add to the script at the same time, enable wireguard client, disable wifi, and change LAN port (the last one is not necessary), it might work.
To bypass switching the LAN port to another mode, I could permanently assign a vlan tag to this port and set the same parameter on the WAN2 port on the home router side (probably only after updating to 4.11).
I'm not asking for a ready solution, but for some tips.
Where can I find the functions assigned to the switch?
Does Mudi 7 have the ability to add a software Toggle Button to the screen?
Unfortunately, the Mudi 7 touchscreen currently does not support adding custom Toggle Button, but we will forward this request to the relevant team for further evaluation.
After logging in through SSH, you can use the following commands to locate the related scripts and view their contents:
ls /etc/gl-switch.d/
cat /etc/gl-switch.d/vpn.sh
cat /etc/gl-switch.d/repeater.sh
You can use them as references to write a custom script that combines the Wi-Fi and VPN changes needed for your two scenarios, then log in through SSH and run it whenever you need to switch.
Thank you for the information provided. I tested it on the MUDIv2, and it works as I expected. However, I couldn't create a new function ("custom script"); I had to edit an existing one.
I will now implement this change on the MUDI 7. Unfortunately, I won't be able to use the physical switch on the device in this case. Temporary I will log in via SSH to call the script, which is much more convenient than performing a settings backup. Perhaps in the future it will be possible to implement some kind of switch on the touchscreen or GL web interface.
I assume these settings will be lost whenever the router's firmware is updated. If I keep a copy of this script in the root folder, will it be preserved (i.e., not deleted)?
And finally, a small suggestion, though I know the development team has more important priorities. Could you add a "custom script" option to the GL interface for Toggle Buttons and Scheduled Tasks? Or perhaps this option would lead to more problems and support inquiries, and therefore will not be considered?
Changes to existing scripts may be overwritten during a firmware upgrade, so please include any scripts you want to preserve—including copies saved under /root—in the upgrade backup list.
After logging in through SSH, run the following commands, replacing /root/custom-switch.sh with the full path of your existing script:
The first command adds the path to /etc/sysupgrade.conf; if the second command displays that path, the script is included in the backup list. For multiple scripts, add each full path on a separate line.
We will forward your suggestions about custom scripts for Toggle Buttons and Scheduled Tasks, along with touchscreen or web controls, to the relevant team for evaluation. These suggestions are still pending further discussion.