NAT between VLANS

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

Hi everyone I've a question in regards of using NAT between VLANS, here's a forum post which I posted at

I'm currently about to replace our existing network into several /24 networks.
This covers 200+ servers.

Since I've NFS shares across the network I need to have these up and running meanwhile I'm doing the IP-range changes.

For this I though that SNAT and DNAT would be a good solution but I haven't succeeded doing it.

For the test I've 2 VLANS.


Not I want to map lets say to the host who has on VLAN eth0.20.

For doing this I did it this way.

# ip addr add dev eth0
# iptables -t nat -I PREROUTING -i eth0 -s -d -j DNAT --to-destiation # iptables -t nat -I POSTROUTING -o eth0 -s -d -j SNAT --to-source

I've used this setup earlier to map external addresses to a internal ip address but in this case it doesn't seam to work.

By doing some tcpdumps the ICMP never seams to reach the final host but the gateway instead.

Please advice, thanks!

 __  ___     ___ ____  __    Jonathan Petersson, System Administrator
/  |/  /_ __/ __/ __ \/ /    MySQL AB, Uppsala, Sweden
/ /|_/ / // /\ \/ /_/ / /__   Mobile: +46 732 00 16 78
/_/  /_/\_, /___/\___\_\___/   SIP: 4431@xxxxxxxxxxxxx
     <___/   Phone: +46 18 17 44 31
         Are you MySQL certified?

Vlan mailing list

[Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Photo]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]     [Linux Resources]

Powered by Linux