Multiple PPTP clients behind NAT
Dear Everyone,
I am configuring a Linux NAT box that allows multiple PPTP tunnels pass through with kernel version 2.4.26 However, I cannot make it work. I am a very newbie in PPTP and iptables. Can anyone give me some help??? Thanks a LOT in advance.
I patched kernel 2.4.26 with patch-o-matic-ng-20040919.tar.bz2 which a snapshot.
I only applied the base options (./runme base) and then I applied extra (./runme extra) with the PPTP, RTSP conntrack and transparent proxy patches. They seem to apply without problems.
I successfully compiled the kernel, after reboot, I loaded the required modules:
ipt_REDIRECTipt_MASQUERADEiptable_filterip_tablesiptable_natip_nat_pptpip_nat_proto_greip_conntrack_pptpip_conntrack_proto_greip_conntrack
my machines configuration is as follows:
192.168.10.0/24
PPTP |
client1->|
| 129.94.133.1
PPTP |
client2->| |->PPTP
| Linux | Server
|->eth1->NAT->eth0->...Internet...->|
... ...->| |->...
| |
PPTP |client n->|
configuration parameters:
A. eth1 IP = 192.168.10.1
B. eth0 IP = 129.94.60.128
C. PPTP Server IP = 129.94.133.1
D. Clients in PPTP Server network: 129.94.182.130, 129.94.182.131 (These IPs cannot be accessed without a VPN)
E. All clients in the 192.168.10.0/24 LAN are windows or Mac machines. After the VPN is setup, they will be assigned with IP addresses of 129.94.165.3 and 129.94.165.4 etc
F. The PPTP Server is not firewalled
I only applied two NAT rules for the above settings:
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE iptables -A FORWARD -i eth1 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward
However, I cannot establish multiple connections. The problem is as following:
I. I setup one connection from client 1 to the PPTP server, then I tried to test the connection by ping either 129.94.182.130 or 129.94.182.131. It works. II. I setup the other connection from client 2 to the same PPTP server. Then two cases will happen:
a) if the client 1 (a Mac machine) keep pinging,
the
connection for client 2 will fail;
b) if client 1 stop pinging, the connection can be
established.
III. After the second connection is setup. Client 2 cannot ping if client 1 keeps pinging, but the status shows that the connection is still there.
I donot know whether it is a problem of the kernel patch or I did not set the iptables rules correctly.
Can anyone please tell me the exact rules according to my figure if I did not set the correct rules?
If the problem is the kernel patch, the following is my
.config file, can anyone please tell me which option I did not apply correctly?
[.config]
# Networking options
#CONFIG_PACKET=yCONFIG_NETFILTER=yCONFIG_FILTER=yCONFIG_UNIX=yCONFIG_INET=yCONFIG_IP_MULTICAST=yCONFIG_IP_ADVANCED_ROUTER=yCONFIG_IP_MULTIPLE_TABLES=yCONFIG_IP_ROUTE_FWMARK=yCONFIG_IP_ROUTE_NAT=yCONFIG_IP_ROUTE_TOS=yCONFIG_NET_IPIP=m
# IP: Netfilter Configuration
#CONFIG_IP_NF_CONNTRACK=mCONFIG_IP_NF_FTP=mCONFIG_IP_NF_CT_PROTO_GRE=mCONFIG_IP_NF_PPTP=mCONFIG_IP_NF_PPTP_DEBUG=yCONFIG_IP_NF_H323=mCONFIG_IP_NF_TFTP=mCONFIG_IP_NF_IRC=mCONFIG_IP_NF_MMS=mCONFIG_IP_NF_IPTABLES=mCONFIG_IP_NF_MATCH_MAC=mCONFIG_IP_NF_MATCH_PKTTYPE=mCONFIG_IP_NF_MATCH_MARK=mCONFIG_IP_NF_MATCH_MULTIPORT=mCONFIG_IP_NF_MATCH_TOS=mCONFIG_IP_NF_MATCH_RECENT=mCONFIG_IP_NF_MATCH_DSCP=mCONFIG_IP_NF_MATCH_AH_ESP=mCONFIG_IP_NF_MATCH_STATE=mCONFIG_IP_NF_MATCH_CONNTRACK=mCONFIG_IP_NF_FILTER=mCONFIG_IP_NF_NAT=mCONFIG_IP_NF_NAT_NEEDED=yCONFIG_IP_NF_TARGET_MASQUERADE=mCONFIG_IP_NF_TARGET_REDIRECT=mCONFIG_IP_NF_NAT_H323=mCONFIG_IP_NF_NAT_LOCAL=yCONFIG_IP_NF_NAT_PPTP=mCONFIG_IP_NF_NAT_PROTO_GRE=mCONFIG_IP_NF_NAT_IRC=mCONFIG_IP_NF_NAT_MMS=mCONFIG_IP_NF_NAT_FTP=mCONFIG_IP_NF_NAT_TFTP=mCONFIG_IP_NF_MANGLE=mCONFIG_IP_NF_TARGET_TOS=mCONFIG_IP_NF_TARGET_ECN=mCONFIG_IP_NF_TARGET_DSCP=mCONFIG_IP_NF_TARGET_MARK=m
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com