[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 12:20, Mezei Zoltan <mezei zoltan gmail com> wrote:
On Fri, Oct 28, 2011 at 12:44, John Haxby <john haxby 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

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