[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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

On 28 October 2011 10:48, Masopust, Christian <christian masopust 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]