[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 11:47:09 UTC 2011


On 28 October 2011 12:20, Mezei Zoltan <mezei.zoltan at gmail.com> wrote:

> On Fri, Oct 28, 2011 at 12:44, John Haxby <john.haxby at gmail.com> wrote:
> > iptables -t nat -A POSTROUTING -p udp -m udp --sport <host-ip> -p 371 \
> >      -j SNAT --to-source <license-ip>:371
>
> You should use the OUTPUT chain in the nat table for this purpose,
> otherwise, correct.
>
>
Even when  I corrected the "--sport <host-ip> -p 371" to "-s <host-ip>
--sport 371" it failed.

# iptables -t nat -A OUTPUT -p udp -m udp -s 192.168.1.1 --sport 371 -j SNAT
--to-source 192.168.1.2:371
iptables: Invalid argument. Run `dmesg' for more information.

# dmesg | tail -1
ip_tables: SNAT target: used from hooks OUTPUT, but only usable from
POSTROUTING
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/rhelv6-list/attachments/20111028/a3127327/attachment.htm>


More information about the rhelv6-list mailing list