Skip to contentSkip to conversation

Multiple PPTP clients behind NAT

DISCUSSION funny guy 2 participants 2 messages Sep 13, 2004

lore
Share & tools
lore

funny guy

author
#0 lore raw

Dear All,

I wish to establish multiple PPTP connection through and linux NAT machine with the following scenario:

PPTP client 1->| |->PPTP Server
1

               |                       |
PPTP client 2->|                       |->PPTP Server
2
               |->NAT->...Internet...->|
... ... ...  ->|                       |->... ... ...
               |                       |
PPTP client n->|                       |->PPTP Server

n

I recompiled Kernel 2.4.26 with the patch patch-o-matic-20031219 from www.netfilter.org and I recompiled iptables v1.2.11

I have the required modules loaded:
ip_conntrack_proto_gre
ip_conntrack_pptp
ip_nat_proto_gre
ip_nat_pptp
iptable_nat
ip_conntrack
ip_tables
iptable_filter

However, the iptables rules stated in
http://www.netfilter.org/patch-o-matic/pom-extra.html#pom-extra-pptp-conntrack-nat
are incomplete. Therefore, I cannot establish multiple connections successfully. The scenario is as following:
1. I can setup two connections at the same time (the signalling seems working)
2. However, only one client is able to ping the machines in the server network
3. If two machines try to ping at that same time, one of them will fail (the data path seems not working)

Can anyone suggest the correct iptable rules for me? or anyone can give me other helps?

Thanks in advance.

__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

#1 lore raw

[email protected] wrote:
...

Quoted 3 lines

I recompiled Kernel 2.4.26 with the patch patch-o-matic-20031219 from www.netfilter.org and I recompiled iptables v1.2.11

You may need a newer POM to match your iptables version... (Why would you use a 9 months old POM when a new one is available ?)

Quoted 10 lines

I have the required modules loaded:
ip_conntrack_proto_gre
ip_conntrack_pptp
ip_nat_proto_gre
ip_nat_pptp
iptable_nat
ip_conntrack
ip_tables
iptable_filter

Quoted 3 lines

However, the iptables rules stated in
http://www.netfilter.org/patch-o-matic/pom-extra.html#pom-extr
a-pptp-conntrack-nat are incomplete. Therefore, I cannot establish

iptables -j ACCEPT -m state --state RELATED,ESTABLISHED iptables -j ACCEPT -d my_pptp_server -p tcp --dport 1723 -m state \
--state NEW

These are the ones you are referring to.
1. These are for redirecting incoming pptp traffic to your pptp server.
2. They are missing a chain and you want to use the FORWARD chain.

iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT iptables -A FORWARD -i <if_lan> -o <if_inet> -s <net_lan> -p tcp \
--dport 1723 -m state --state NEW -j ACCEPT
iptables -t nat -A POSTROUTING -o <if_inet> -s <net_lan> -p tcp \
--dport 1723 -j SNAT --to-source <ip_inet>

Probably you also need rules like these :

iptables -A FORWARD -i <if_lan> -o <if_inet> -s <net_lan> -p gre \
-j ACCEPT
iptables -t nat -A POSTROUTING -o <if_inet> -s <net_lan> -p gre \
-j SNAT --to-source <ip_inet>

Quoted 7 lines

multiple connections successfully. The scenario is as following:
1. I can setup two connections at the same time (the signalling seems working) 2. However, only one client is able to ping the machines in the server network 3. If two machines try to ping at that same time, one of them will fail (the data path seems not working)

You really mean ping ? Are the PPTP servers firewalled ? (Not in your ascii art.)
We don't really know your config. Not sure why this happens.

Gr,
Rob