需要哪些IPTables设置来允许多个客户端通过VPN隧道

我试图locking我的VPS,但仍然允许PPTP-VPN访问,并陷入困境。 希望有人能够提供意见。 基本上试图找出我的iptables的哪一部分是防止多个客户端隧道到networking。 我的iptables目前被设置为以下。

*filter # Allow all loopback (lo0) traffic and drop all traffic to 127/8 that doesn't use lo0 -A INPUT -i lo -j ACCEPT -A INPUT ! -i lo -d 127.0.0.0/8 -j REJECT # Accept all established inbound connections -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT # Allow all outbound traffic - you can modify this to only allow certain traffic -A OUTPUT -j ACCEPT # Allow PPTP connection. -A INPUT -p tcp --dport 1723 -j ACCEPT -A INPUT -p 47 -j ACCEPT # Allow Tunneling -A FORWARD -i ppp0 -o venet0 -j ACCEPT -A FORWARD -i venet0 -o ppp0 -j ACCEPT # Allow SSH connections # # The -dport number should be the same port number you set in sshd_config # -A INPUT -p tcp -m state --state NEW --dport 22 -j ACCEPT # Allow ping -A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT # Log iptables denied calls -A INPUT -m limit --limit 5/min -j LOG --log-prefix "iptables denied: " --log-level 7 # Reject all other inbound - default deny unless explicitly allowed policy -A INPUT -j REJECT -A FORWARD -j REJECT COMMIT 

我基本上修改了这篇文章中build议的iptables设置http://library.linode.com/securing-your-server#sph_creating-a-firewall

然后将以下代码添加到/etc/rc.local,允许转发所有stream量,并且可以通过我的VPN访问networking,但仅限于一个客户端。 所有其他客户端不能隧道。

 iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j SNAT --to-source xxxx 

如果我重置iptables并只运行以下,那么所有客户端都能够隧道。

 iptables -t nat -A POSTROUTING -j SNAT --to-source xxxx 

任何了解iptables的人的build议将不胜感激!