troubleshooting Question

How to save ip route?

Avatar of abilash_praveen
abilash_praveenFlag for India asked on
Linux Networking
2 Comments1 Solution2474 ViewsLast Modified:
Hello,
I have used ip route/rule as below:
ip route add table 4 default via 61.257.142.1
ip rule add from 61.257.142.233 lookup 4
ip rule addfwmark 4 table 4

Now all requests to 61.257.142.233 are being routed via 61.257.142.1 and not the default gateway which is just fine. However, when i restart the server these changes seems to be lost. Can someone tell me how i'd save these so it is there forever? or is there any conf file (such as for ipconfig /etc/sysconig/iptables) where i can manually type in these commands?

Thanks
aP
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 2 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros