NAT between VLANS | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
I'm currently about to replace our existing 10.0.0.0/8 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. eth0 eth0.10 10.128.16.0/24 eth0.20 10.128.17.0/24Not I want to map lets say 10.100.1.20 to the host who has 10.128.17.2 on VLAN eth0.20.
For doing this I did it this way. # ip addr add 10.100.1.20/8 dev eth0# iptables -t nat -I PREROUTING -i eth0 -s 0.0.0.0/0 -d 10.100.1.20 -j DNAT --to-destiation 10.128.17.2 # iptables -t nat -I POSTROUTING -o eth0 -s 10.128.17.2 -d 0.0.0.0/0 -j SNAT --to-source 10.100.1.20
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
<___/ www.mysql.com Phone: +46 18 17 44 31
-----------------------------------------------------------------------
Are you MySQL certified? www.mysql.com/certification
_______________________________________________
Vlan mailing list
Vlan@xxxxxxxxxxxxxxx
http://www.candelatech.com/mailman/listinfo/vlan
[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]