How to persist changes to the routing table? - Printable Version +- Linux Lite Forums (https://www.freecinema2022.gq/forums) +-- Forum: Hardware - Support (https://www.freecinema2022.gq/forums/forumdisplay.php?fid=6) +--- Forum: Network (https://www.freecinema2022.gq/forums/forumdisplay.php?fid=24) +--- Thread: How to persist changes to the routing table? (/showthread.php?tid=6896) |
How to persist changes to the routing table? - arun jayapal - 04-04-2020 I am running linux lite 4.6 inside virtualbox. The machine has two network interfaces. I face the issue where the machine isn't able to connect to the internet. After investigation I found the issue to be with my routing table. No idea why this routing table got persisted in the first place. Code: $ ip route After a bit of tinkering, I have a workaround. I modify the routing table as follows: Code: $ ip route I am not sure why the above works. However, I have to manually issue commands to setup the routing table to the state as shown above, after every reboot. I have tried some ways to persist using the [tt]/etc/network/interfaces[/tt] file. The below file is an attempt at that: Code: auto lo But nothing worked. Next I tried putting the commands in [tt]/etc/rc.local[/tt] that didn't work too. What is the correct way to persist this? Re: How to persist changes to the routing table? - supergamer - 04-05-2020 I am not familiar with crontab but you can setup a cronjob to start at every reboot. How to get exactly what you need is you will have to create a script then just put the script somewhere like in the /usr/scripts folder and use a sudo crontab -e to run the script with @reboot then path to your script. Just an off the wall suggestion. Re: How to persist changes to the routing table? - arun jayapal - 04-17-2020 Sounds great. However, if there were errors in the script, how can I know what it was...? Re: How to persist changes to the routing table? - supergamer - 04-17-2020 Make the script, test the script out after a reboot by using the terminal to execute it then see if it works. Always test first before blindly doing anything that is automatic. If there are errors you should see the errors and if it worked or not. |