Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

IP Route modification

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

839 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