# Remap Local Addresses, to Connect Two Networks with an Overlap in the Private Address Range

Using iptables 1.2.7a+ and the NETMAP target:

```bash
iptables -t nat -A PREROUTING -d 192.168.0.0/24 -j NETMAP --to 192.168.1.0/24
```

or

```bash
iptables -t nat -A POSTROUTING -d 192.168.1.0/24 -j NETMAP --to 192.168.0.0/24
```
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9