Solved

IP Route modification

Posted on 2009-04-02
3
370 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
[X]
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
3 Comments
 
LVL 78

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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Intel fortran compiler (ifort) 5 59
Remove Resilio directory from Netgear ReadyNAS 212 via SSH. 2 68
plsql job on oracle 18 79
General network\voice question.. 4 22
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
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é.
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

726 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