FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 06-17-2008, 10:51 PM
Les Mikesell
 
Default control outgoing IP address?

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?


--
Les Mikesell
lesmiksell@gmail.com

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 06-17-2008, 11:03 PM
Bill Campbell
 
Default control outgoing IP address?

On Tue, Jun 17, 2008, Les Mikesell 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?

That depends on the application. You can specify the outgoing IP address
for postfix with ``smtp_bind_address' in main.cf. The inn NNTP server
uses ``sourceaddress' in the inn.conf file, etc.

Bill
--
INTERNET: bill@celestial.com Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way
Voice: (206) 236-1676 Mercer Island, WA 98040-0820
Fax: (206) 232-9186

There are three kinds of men. The ones that learn by reading. The few who
learn by observation. The rest of them have to pee on the electric fence
for themselves. -- Will Rogers
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 06-17-2008, 11:53 PM
Barry Brimer
 
Default control outgoing IP address?

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

Barry
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 06-18-2008, 01:04 PM
Les Mikesell
 
Default control outgoing IP address?

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@gmail.com

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 06-18-2008, 01:17 PM
Barry Brimer
 
Default control outgoing IP address?

On Wed, 18 Jun 2008, Les Mikesell wrote:


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?


In some applications you can .. but it is application dependent. what
applications are you looking to do this with?


Barry
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 06-18-2008, 01:42 PM
Kevin Thorpe
 
Default control outgoing IP address?

Don't take this as a definitive answer, but I have multi-aliased CentOS
boxen.


I find that outgoing connections always come from the main IP address,
not the aliases. In particular these boxen are web servers hosting
multiple sites, hence the multi-IP and connections to the database all
appear to be from the main IP.


Applications can be attached to individual IPs, but I think the default
routing is to use the main IP of the interface.


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 06-19-2008, 04:08 AM
"Filipe Brandenburger"
 
Default control outgoing IP address?

On Tue, Jun 17, 2008 at 6:51 PM, Les Mikesell <lesmikesell@gmail.com> wrote:
> I'd like to have it use it's original IP as the source for outbound connections.
> Where do you control that?

I didn't try it, but you probably can control that with the "ip route"
command when you create a route to a specific network or a default
route.

Maybe try something like:

# ip route add default via [Gateway_Address] dev [Interface] src [Alias_Address]

Maybe the syntax is not 100% right, "man ip" might help you.

You can also use this IP for outgoing connections only to some
specific destinations, by using a more specific network address
instead of "default".

You will probably have to remove the default gateway configuration
from /etc/sysconfig/network and add this "ip route" command somewhere
(rc.local?).

Anyway, let us know if you got it to work!

HTH,
Filipe
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 05:01 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org