September 19, 20187 yr The custom routes I enter in the routing table do no persist a reboot. Is there a way to make them stick? Edited September 24, 20187 yr by surfshack66
September 25, 20187 yr Let me preface this by saying i know exactly 0 about routing tables in linux and how they are modified. Since the unRAID OS runs in ram and is unpacked fresh from the USB drive on boot, changes that you make to the underlying linux system at runtime do not persist. The only things that do persist across reboot are those things that the unraid GUI / Config files allow you to tweak. With that said I dont know one way or the other whether unRAID has a configuration option for static routes, but if you have looked and not found it then possibly not. In that case your only choice is to re-make the changes on every boot. I would suggest writing a script that makes the changes and then run it on startup using the CA User Scripts plugin.
September 25, 20187 yr 2 hours ago, surfshack66 said: Does anyone have some advice for this issue? Did you even check the network settings? You can add routes there.
September 25, 20187 yr Author 9 minutes ago, saarg said: Did you even check the network settings? You can add routes there. Yes. I add the custom routes in the network settings page. They do not persist after rebooting. Is that normal? I figured they would persist.
September 25, 20187 yr 3 hours ago, surfshack66 said: Yes. I add the custom routes in the network settings page. They do not persist after rebooting. Is that normal? I figured they would persist. Then it's either a bug or @bonienl made it like that for a reason.
September 25, 20187 yr You can definitely do this, Any commands you want to run after a reboot can be put in /boot/config/go The server will run the go script at startup. There's obviously another few ways to achieve - like the CA User Scripts idea above. You can modify the routing table directly via commands such as: ip route add 192.168.0.0/16 via 192.168.1.111 I'm not at my machine right now but I believe you can also use files with the name route-eth# to define routes for an interface - should be placed at /etc/sysconfig/network-scripts/ So you could make a file called route-eth0 - put your desired routes in it - save to /boot/config/route-eth0 and in your go file just copy the file into place. However, you'd need to check if this worked after a reboot because the network might need cycling afterwards. The commands route or ip r might help too.
September 26, 20187 yr Author 8 hours ago, primeval_god said: The only things that do persist across reboot are those things that the unraid GUI / Config files allow you to tweak. Maybe this is a bug then? The changes are made on the Network Settings page of the GUI. It's nice being able to add them there, the only issue is they don't persist. Perhaps someone from unraid can confirm if this is a bug or could be a feature request... EDIT: Also thanks to everyone for the help so far Edited September 26, 20187 yr by surfshack66
September 26, 20187 yr 14 hours ago, surfshack66 said: I add the custom routes in the network settings page. They do not persist after rebooting. Is that normal? Yes, this is normal When adding custom routes they are only stored in RAM. Rebooting the system clears these custom routes. To make them persistent the equivalent 'ip' commands need to be executed upon a reboot. One way to do this is using the custom scripts plugin.
September 26, 20187 yr Author Thanks @bonienl I'll use the custom scripts plugin with the command @Delarius mentioned. Does the attached script look right? Currently, the custom routes entered in the GUI are associated with the gateway name, i.e. br0.10. Does that need to be included in the script as well?
October 15, 20187 yr Author On 9/25/2018 at 5:40 PM, Delarius said: You can definitely do this, Any commands you want to run after a reboot can be put in /boot/config/go The server will run the go script at startup. There's obviously another few ways to achieve - like the CA User Scripts idea above. You can modify the routing table directly via commands such as: ip route add 192.168.0.0/16 via 192.168.1.111 I'm not at my machine right now but I believe you can also use files with the name route-eth# to define routes for an interface - should be placed at /etc/sysconfig/network-scripts/ So you could make a file called route-eth0 - put your desired routes in it - save to /boot/config/route-eth0 and in your go file just copy the file into place. However, you'd need to check if this worked after a reboot because the network might need cycling afterwards. The commands route or ip r might help too. The command doesn't seem to work properly. I receive the following message: Error: Nexthop has invalid gateway.
October 15, 20187 yr 3 hours ago, surfshack66 said: Error: Nexthop has invalid gateway. Your gateway (192.168.1.111) must be part of a known network. I.e. 192.168.1.x/24 must exist.
October 15, 20187 yr Author 1 hour ago, bonienl said: Your gateway (192.168.1.111) must be part of a known network. I.e. 192.168.1.x/24 must exist. Sorry for the confusion. The gateway you mentioned was an example fro @Delarius. My specific script is attached above, but I can attach another copy. All of these networks exist..
October 15, 20187 yr 1 minute ago, surfshack66 said: All of these networks exist.. What is the output of ip route show
October 15, 20187 yr Author 18 minutes ago, bonienl said: What is the output of ip route show Linux 4.18.14-unRAID. Last login: Sun Oct 14 14:10:34 -0400 2018 on /dev/pts/2. root@Tower:~# ip route show default via 192.168.1.1 dev br0 proto dhcp src 192.168.1.2 metric 218 172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 192.168.1.0/24 dev br0 proto dhcp scope link src 192.168.1.2 metric 218 192.168.20.0/24 dev br0.20 scope link metric 1 192.168.70.0/24 dev br0.70 scope link metric 1 192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 I had to manually add 192.168.20.0 and 192.168.70.0 via the Network Settings page.
October 15, 20187 yr Add a network by doing something like this ip route add 192.168.10.0/24 dev br0.10
October 15, 20187 yr Author 3 minutes ago, bonienl said: Add a network by doing something like this ip route add 192.168.10.0/24 dev br0.10 Thank you! That worked
February 5, 20233 yr it would be great if you could permanently save gateway / route changes in the gui why else do i have a menu item network if something like this is not saved
May 7, 20242 yr At the very least it should have a notice that they are not persistent. I just found this out the hard way and my search led me hear to a 5 year old post.
October 17, 2025Oct 17 How can this be marked "Solved"? The solution here is one of:Changes via the GUI are persistedA very big notice on the Network settings page saying "Changes to the routing table will not persist across reboots.".
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.