Re: need help on *nat filter for multiple source IP

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

 



no doubt wrote:
Hello Mart,
Yeah, I just tweak around your config.

Here they are..

iptables -t nat -n MY80FWD
iptables -A PREROUTING -s 192.168.4.20/32 -i eth2 -p tcp -m tcp
--dport 80 -j MY80FWD
iptables -A PREROUTING -s 192.168.4.10/32 -i eth2 -p tcp -m tcp
--dport 80 -j MY80FWD
iptables -A PREROUTING -s 192.168.4.100/32 -i eth2 -p tcp -m tcp
--dport 80 -j MY80FWD
iptables -A MY80FWD -p tcp -j DNAT --to-destination 192.168.3.10:80

iptables -A POSTROUTING -o ppp+ -j MASQUERADE


--khairul

Hello,

well, this is funny then.
Your original request was:

[quote]

I would like to achieve that for all IP's in 192.168.4.0/24 that are
accessing outside internet address port 80, will be directed to
192.168.3.10 port 80 EXCEPT for few IPs namely 192.168.4.10,
192.168.4.100 and 192.168.4.20


There must have been some 'unfiltered' mental connection between us :-)
Because I was misunderstanding your post, just the way you were actually intending, but somehow not expressing correctly.
Just too funny :-)
You should have asked some like that:

I'd like to redirect http traffic for only 3 host of my subnet, while the rest...

Well, maybe I then would have misread your posting and the result would not have been the desired one.
lol :-)

Have a nice day

Mart
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux