Solved

IP Route modification

Posted on 2009-04-02
3
365 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 77

Assisted Solution

by:arnold
arnold earned 100 total points
ID: 24057020
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
ID: 24058508
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
ID: 24074537
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Implementing Avaya's One-X portal is pretty painless, until you want to deploy this to the Android and iPhone clients when these clients are outside of your network. The clients will also work within your local network. Here is our experience and so…
Almost all Internet protocol telephones have built-in switches at the back that allow you to connect your personal computer to one port and use the other port to connect your phone to to a Cisco switch.   Why we need to connect the PC to the pho…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

930 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

12 Experts available now in Live!

Get 1:1 Help Now