I’m using the wlan0 connection (in hotspot mode) and some other device as internet gateway. In order for this to work I have to do
route add default gw 192.168.42.20 (the ip of the gateway device)
This works perfectly but my application requires that this is made automatically while booting. So, my question is: How do I make this persistent over reboot?
Thanks in advance.
This type of stuff on Reach is handled by
systemd-networkd. You have two options:
- Create a systemd service, which will execute your command every boot
- Or add a config file to
/etc/systemd/network, some examples here.
Would you mind sharing your solution?
Of course, my bad.
I created the file
/etc/systemd/network/wlan0.network with the following lines:
Note that my aplication needs the IP to be fixed, for DHCP the solution may vary.
This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.