[rhelv6-list] weird behaviour of an application when a network interface has 2 ip-addresses

John Haxby john.haxby at gmail.com
Fri Oct 28 10:44:24 UTC 2011


On 28 October 2011 10:48, Masopust, Christian <
christian.masopust at siemens.com> wrote:

> **
> I've a configuration here where one of my interfaces has 2 ip-addresses
> (added by "ip addr add ...").
>
> Now I'm running a proprietary license-daemon (no source available here)
> that should respond to
> request to that additional address.
> The license-daemon will receive the requests (UDP-packets), but any answer
> is sent out with the
> wrong source-address!!  (see tcpdump below).
>
> So, do you know any method to force/change/filter (whatever :)) that
> packets have correct source address?
>
>
The license daemon, I'd guess, is listening on the wildcard IP address so
when it sends a UDP packet it goes out on the primary IP address.

It's should be enough to correct this with iptables, something like this
(completely untested):

iptables -t nat -A POSTROUTING -p udp -m udp --sport <host-ip> -p 371 \
     -j SNAT --to-source <license-ip>:371

jch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/rhelv6-list/attachments/20111028/bdf9d7b9/attachment.htm>


More information about the rhelv6-list mailing list