Solved

IP Route modification

Posted on 2009-04-02
3
364 Views
Last Modified: 2013-12-27
We use qmail on our server. We wanted to change the outgoing IP for qmail. We read a solution to this where you change the default IP address of outgoing connections. This was accomplished by using the following command:

# /sbin/ip route change default via ***.***.***.*** dev eth0 src yyy.yyy.yyy.yyy.

Upon restarting qmail, this fixed our problem; outgoing mail showed the correct IP address. However, upon server reboot, it restores to the initial configuration. Any idea why and how to prevent it from restoring to the default? Any feedback is greatly appreciated.

Thank you,
Adam
0
Comment
Question by:ajschw
3 Comments
 
LVL 76

Assisted Solution

by:arnold
arnold earned 100 total points
Comment Utility
Check www.qmail.org I think there is a patch that adds functionality to bind the a qmail process that deals with outgoing emails to a specific IP.

The other option is to configure your server to the new IP.

I.e. make the change permananet modify the /etc/hosts file to reflect the updated IP for the system/ or /etc/networking-scripts.
Or better still use the network configuration scripts to set the IP of the system permanently.
0
 
LVL 34

Assisted Solution

by:Duncan Roe
Duncan Roe earned 150 total points
Comment Utility
As a quick and dirty fix you could include your ip route command in /etc/rc.d/rc.local (location varies with distribution but they all have a local facility somewhere). That's like re-entering te command after every reboot. Invoke ip by full pathname (i.e. /sbin/ip)
0
 
LVL 32

Accepted Solution

by:
Kamran Arshad earned 250 total points
Comment Utility
Hi,

After rebooting the routes were not added persistently. To make the route change persistently;

http://www.itsyourip.com/Linux/howto-add-a-persistent-static-route-in-redhat-enterprise-linux/
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
As companies replace their old PBX phone systems with Unified IP Communications, many are finding out that legacy applications such as fax do not work well with VoIP. Fortunately, Cloud Faxing provides a cost-effective alternative that works over an…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now