Re: DNAT on another interfaces' IP

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

 



>Hello,

Hi,

>iptables -t nat -A PREROUTING -d 192.168.0.1 -p tcp --dport 22 -j DNAT
>--to-destination 192.168.2.2
>..
>If I ssh through eth0 (from 192.168.0.3) this gets me to 192.168.2.2
>as expected. But if I ssh through eth1 (from 192.168.1.3) to IP
>192.168.0.1,
>I connect to router, meaning there is no DNAT in effect. Is this the
>intended behaviour? If so, please explain why.

It's not intended behaviour. It should work the way you want unless
some other rules in nat/raw table prevent it. Please send the output of
following commands:
iptables -nvL -t raw
iptables -nvL -t nat

regards,
Marek Kierdelewicz
--
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