Re: iptables udp 1195 MASQUERADE

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

On Fri, 2012-02-10 at 00:05 -0600, Enrique Huerta de la Fuente wrote:
> I have four interfaces and the default gateway is eth1
> - eth0 (LAN)
> - eth1 (internet link)
> - eth3 (internet link)
> - ppp0 (internet link)
> I mark (mangle) package udp (1195) for out by interface ppp0.
> "iptables -t mangle -I OUTPUT -p udp -m udp --dport 1195 -j MARK --set-mark 1
> and when i try MASQUERADE the package udp (1195) with "iptables -t nat
> -I POSTROUTING -p udp -m udp --dport 1195 -o ppp0 -j MASQUERADE", does
> not work!!

I'm still not sure exactly what you're trying to achieve. Presumably you
want different traffic going out on different interfaces, source-natted
to that interface IP address.

If so, why not route your traffic as you are already doing (I assume
that is working) and then just MASQUERADE each interface:

iptables -t nat -I POSTROUTING -o ppp0 -j MASQUERADE


To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at

[Linux Netfilter Development]     [Linux Kernel Networking Development]     [Linux Networking Development]     [Linux Kernel Development]     [Linux Resources]     [LARTC]     [Bugtraq]     [Consulting]     [Free Internet Dating]     [Yosemite Forum]     [Photo]

Add to Google Powered by Linux