[CentOS] control outgoing IP address?

Les Mikesell lesmikesell at gmail.com
Wed Jun 18 13:04:53 UTC 2008


Barry Brimer wrote:
>> I'd like to consolidate some services that have been assigned by IP 
>> (dns, syslog etc.) onto one machine by giving it IP aliases to accept 
>> connections for the old addresses until all the references are fixed. 
>> However, I'd like to have it use it's original IP as the source for 
>> outbound connections. Where do you control that?
> 
> There may be settings in each application that control that, but in case 
> there are not .. you should be able to do something like :
> 
> iptables -t nat -A POSTROUTING -p tcp --sport 334 -j SNAT --to 2.3.4.5
> 

Is there no way to control the default source address?

-- 
   Les Mikesell
     lesmikesell at gmail.com




More information about the CentOS mailing list