One-to-one NAT

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

 



Hi,

I would like to map one network onto another in a one-to-one way, that
is:
192.168.1.x <---> 10.0.1.x

I know it is possible to use ranges, as demonstrated by the following
example from the iptables NAT HowTo:
# iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o eth1 \
  -j SNAT --to 1.2.3.0/24

I think this is not the solution for me, as the same document also
says:
---
6.3.1.  Selection Of Multiple Addresses in a Range

  If a range of IP addresses is given, the IP address to use is chosen
  based on the least currently used IP for connections the machine
knows
  about.
---

However, I need the mapping to resolve address range clashes on a VPN
(192.168.1.0 is used on both networks, and I would like network A to
access machines of network B as if they were in 10.0.1.0, not in
192.168.1.0).

Please let me know how I can do that without adding a mapping for
individual addresses.

TIA,
Kofa

Homepage at http://emil.alarmix.org/kofa/  For PGP public key: send mail
with the subject PGP Public Key Request or finger kofa@lemma.math.bme.hu





[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