All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martijn Lievaart <m@rtij.nl>
To: Neil Aggarwal <neil@JAMMConsulting.com>
Cc: netfilter@lists.netfilter.org
Subject: Re: NAT rules for VPN only allowing one user?
Date: Wed, 30 May 2007 23:06:37 +0200	[thread overview]
Message-ID: <465DE75D.5070006@rtij.nl> (raw)
In-Reply-To: <000c01c7a217$2e0ab670$dededede@neilhp>

Neil Aggarwal wrote:
> Hello:
>
> I have a Linux machine acting as a firewall for my
> network.  I have a couple of remote users that need
> access to the internal network, so I put a Linksys
> RV042 VPN Router on my internal switch.
>
> On the Linux box, I set these iptables rules (Line breaks
> added for readability):
>
> /sbin/iptables -t nat -A PREROUTING -p tcp 
> 	-i eth0 -d $ETH0_IP 
> 	--sport 1024: --dport 1723 
> 	-j DNAT --to $LINKSYS_VPN_IP:1723
> /sbin/iptables -A FORWARD -i eth0 -o eth1 
> 	-d $LINKSYS_VPN_IP -p tcp 
> 	--sport 1024: --dport 1723 
> 	-m state --state NEW,ESTABLISHED -j ACCEPT
> /sbin/iptables -t nat -A POSTROUTING -o eth1 
> 	-d $LINKSYS_VPN_IP -p tcp --dport 1723 
> 	-j SNAT --to-source $ETH1_IP
> /sbin/iptables -t nat -A PREROUTING -p gre -i eth0 
> 	-j DNAT --to $LINKSYS_VPN_IP
> /sbin/iptables -A FORWARD -i eth0 -o eth1 
> 	-d $LINKSYS_VPN_IP -p gre -j ACCEPT
> /sbin/iptables -t nat -A POSTROUTING -o eth1 
> 	-d $LINKSYS_VPN_IP -p gre -j SNAT --to-source $ETH1_IP
> /sbin/iptables -t nat -A PREROUTING -s $LINKSYS_VPN_IP 
> 	-d $ETH1_IP -p gre -j ACCEPT
> /sbin/iptables -A FORWARD -i eth1 -o eth0 
> 	-s $LINKSYS_VPN_IP -p gre -j ACCEPT
>
> Either one of my remote users can connect to the VPN using
> the Windows XP VPN client.  But, if one of them is connected
> and the other tries to connect, the second person gets to
> the verifying username and password screen and then
> gets an Error 619 that they are not able to connect.
>
> I think somehow the existing connection is mis-routing
> the login for the second connection.
>   

IIRC, for this to work a helper must be loaded to fixup the GRE stream. 
And older implementations only allowed one connection. I might be 
totally of on this one, but maybe a newer kernel will fix your problem.

You might ask in the netfilter-devel list where there is more expertise 
on this.

HTH,
M4



  parent reply	other threads:[~2007-05-30 21:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-29 17:31 NAT rules for VPN only allowing one user? Neil Aggarwal
2007-05-29 18:12 ` Jan Engelhardt
2007-05-30  5:17   ` Neil Aggarwal
2007-05-30 14:37     ` Michael Gale
2007-05-30 15:16       ` Martin McKeay
2007-05-30 15:28         ` Neil Aggarwal
2007-05-30 21:06 ` Martijn Lievaart [this message]
2007-05-31  0:24   ` Gregory Carter
2007-05-31  1:07     ` Neil Aggarwal
     [not found] <000001c7a2ce$6d4a5860$dededede@neilhp>
2007-05-30 16:12 ` Martin McKeay

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=465DE75D.5070006@rtij.nl \
    --to=m@rtij.nl \
    --cc=neil@JAMMConsulting.com \
    --cc=netfilter@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.