One to One NAT query

From: Josh Howlett (bujfxh_at_shark.cse.bris.ac.uk)
Date: 05/06/04


Date: Thu, 6 May 2004 11:32:34 GMT

I am trying to do something a bit unusual :-). I hope someone
can help.

I have a Linux NAS that terminates PPP sessions. When the PPP
session is connected, the PPP users are required to start a
VPN session to a VPN server.

The VPN protocol is PPTP.

    <-----------VPN---------->
    <---PPP---->
User ---------- NAS -----+---- VPN server A
                         |
                         +---- VPN server B
                         |
                         \---- VPN server C

I have multiple VPN servers (A, B and C), and I want to be
able to control where the user's VPN gets terminated.

For example, one day I might want to terminate user Joe's
VPN session on server B; another day, I might want to
terminate it on server C.

I also didn't want this to be reliant on the user changing
the IP address of the destination VPN server. So, regardless
of what IP address the user uses, the VPN always goes to the
right VPN server.

I thought I might do this by using one-to-one NAT on the NAS.

iptables -t nat -A PREROUTING -i ppp0 -j DNAT --to <IP of VPN>
iptables -t nat -A POSTROUTING -o ppp0 -j SNAT --to <IP of VPN>

...where "IP of VPN" is the address of the VPN that I want to
direct the user's VPN session to.

However, this doesn't seem to work. This is an abbreviated
version of what I see (the user has dialed in and been
allocated 172.16.42.7; the user then attempts to VPN to
1.2.3.4, which I NAT to the desired address (XXX)):

Src Dst Proto Info

172.16.42.7 1.2.3.4 TCP 1659 > pptp [SYN]
1.2.3.4 172.16.42.7 TCP pptp > 1659 [SYN, ACK]
172.16.42.7 1.2.3.4 PPTP Start-Control-Connection-Request

So far so good; the PPTP TCP control channel is correctly
NATed. However, I think get:

XXX 172.16.42.7 PPP LCP Configuration request
172.16.42.7 XXX PPP LCP Configuration request
XXX 172.16.42.7 PPP LCP Configuration request
172.16.42.7 XXX PPP LCP Configuration request
etc...

(These are encapsulated in the PPTP session's GRE data channel).

The PPP LCP packets does not appear to get NATed! Instead, the REAL
IP of the VPN server is stamped on the packets. LCP negotiation
times out, presumably because the VPN client simply drops the
packets as it doesn't recognise the source address.

So... why are the GRE packets not getting NATed on the NAS?

josh.

-- 
------------------------------------------------------------
Josh Howlett, Networking & Digital Communications,
Information Systems & Computing, University of Bristol, U.K.
'phone: 0117 928 7850 email: josh.howlett@bris.ac.uk
------------------------------------------------------------


Relevant Pages

  • RE: Terminal Services Sessions disconnecting regularly
    ... When the TS session has dropped previously, the VPN has stayed up with full ... As we have a router to router VPN or client to router vpn - MVP's have ... It appears as if the connection just fades away correct? ...
    (microsoft.public.windows.terminal_services)
  • RE: Terminal Services Sessions disconnecting regularly
    ... I was/am having the same problem with VPDN and VPN Gre IPSEC. ... It appears as if the connection just fades away correct? ... Almost as if the session is not being encapsulated in the tunnel. ... > I have a client with windows 2000 server running terminal services. ...
    (microsoft.public.windows.terminal_services)
  • Re: Multiple VPN sessions in same LAN
    ... I checked with the modem manufacturer. ... I disabled the Squid on the firewall but didn't help. ... but sone router or firewall allow only one VPN session. ...
    (microsoft.public.win2000.ras_routing)
  • Re: VPN Error 691
    ... Here after the detailled event logs ... Tentative d'ouverture de session en utilisant des informations ... Utilisateur: GPH ... VPN error 691 - access denied ...
    (microsoft.public.windows.server.sbs)
  • Re: PIX 501 accounting on remote dial-in ipsec
    ... session duration. ... In another case I use VPN 3000 concentrator and when user ... I'm expecting same from PIX accounting but Radius server ... What is a "remote dial-in ipsec user"? ...
    (comp.dcom.sys.cisco)