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

Network address rewriting



Hello all,
I'm having the most amazing trouble getting a bit of address re-writing to
work.
What I want to do is as follows:
(quick diag first)
                  ------------
           fxp1   | OpenBSD  | fxp0
        ----------|   3.4    |---------
  10.21.21.2/24   |  i386    | 10.3.1.130/24
                  ------------
Now, traffic arriving in on fxp0 going to 10.65.0.0/16 needs to have its
destination address changed to 10.95.0.0/16 and its source address changed
to 10.21.21.0/24 (where the host parts of the networks are the same as the
original)
e.g. A packet arrives in on fxp0 destined to 10.65.1.4 coming from
10.88.1.8. This should leave fxp1 with the destination set to 10.95.1.4 and
the source address of 10.21.21.8
Packets arriving in on fxp1 destined to 10.21.21.8 coming from 10.95.1.4
should leave on fxp0 going to 10.88.1.8 with the source as 10.65.1.4
I have tried binat, rdr, straight nat and various combinations thereof. The
closest i managed was to get the fxp0 -> fxp1 direction working, but the
bitmask was working on the destination address.
Is this possible and any ideas how I can do this?
Thanks for your time and patience
 -- joe.
Joe Warren-Meeks
Technical Operations Director
Inspired Broadcast Networks & The Cloud
http://www.inspiredbroadcast.net/
Out of Home Pay to Play Networked Entertainment
1-7, Livonia Street, London W1F 8AD
Tel: +44 (0)20 7478 8282
Mob: +44 (0)7789 176078
Fax: +44 (0)20 7287 0131