Bluehost.com Web Hosting $6.95

sending packets from alias address

This is a discussion on sending packets from alias address within the Linux Networking forums, part of the Linux Forums category; Hi I wonder if anyone knows the answer to this little question. I currently have two redhat ES3 servers running ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-01-2005
peter.glover@dsl.pipex.com
 
Posts: n/a
Default sending packets from alias address

Hi

I wonder if anyone knows the answer to this little question. I
currently have two redhat ES3 servers running the cluster suite ha
package. I've been asked by my business to get all outbound ip packets
from the cluster(package) to appear from the alias ( cluster ip
asddress )? This is due to a requirement by internat NAT restrictions
for our application.
Anyone know of an easy solution?

Regards

Peter
Reply With Quote
  #2 (permalink)  
Old 02-02-2005
Vincent Jaussaud
 
Posts: n/a
Default Re: sending packets from alias address

peter.glover@dsl.pipex.com wrote:

> Hi
>
> I wonder if anyone knows the answer to this little question. I
> currently have two redhat ES3 servers running the cluster suite ha
> package. I've been asked by my business to get all outbound ip packets
> from the cluster(package) to appear from the alias ( cluster ip
> asddress )? This is due to a requirement by internat NAT restrictions
> for our application.
> Anyone know of an easy solution?


I don't know I understand your setup correctly, but If I do you could do
something like that:

You should first mark any relevant traffic using iptables owner/MARK
capabilities, then route the traffic according to that mark.

Something like:

iptables -t mangle -A OUTPUT -m owner --pid-number PID_of_your_APPS -j MARK
--set-mark 0x1

Then route the traffic accordingly:

ip route add table your_table default via $GATEWAY_IP dev $GATEWAY_DEV src
$CLUSTER_IP
ip rule add prio 10 fwmark 0x1 lookup your_table

Note: This will only work if the SRC IP has not been set by the application
itself. In such a case, you'll have to NAT the traffic before it goes out
the interface using iproute2 nat feature.

Hope that helps.
Vincent.

>
> Regards
>
> Peter


--
Kelkoo Security Manager / Networks & Systems Architect
JID: portsentry@jabber.kelkoo.net / Vincent.Jaussaud.AT.kelkoo.DOT.net
Kelkoo.com --- GNU/Linux Powered
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 01:33 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0