0. compile package
ppp-2.4.5.tar.gz & pptpd-1.3.4.tar.gz
GitHub - Linux_Cross_Compiler_tools
configure pptpd and ppp
1. sudo gedit /etc/pptpd.conf
option /etc/ppp/pptpd-options
localip 10.10.0.1
remoteip 10.10.0.2-10
2. sudo gedit /etc/ppp/pptpd-options
name pptpd
refuse-pap
refuse-chap
refuse-mschap
require-mschap-v2
require-mppe-128
ms-dns 8.8.8.8
ms-dns 8.8.4.4
proxyarp
nodefaultroute
lock
nobsdcomp
debug
dump
3. sudo gedit /etc/ppp/chap-secrets
aliens * changeme *
4. start pptpd
# -d = debug
sudo pptpd -d
Reference:
- How to install a VPN Server (PPTP) on Debian/Ubuntu Linux VPS
- Ubuntu 11.10 架設 pptp server (VPN server) & Win 7 pptp client 連線設定
- HOWTO: Setting up a vpn using ssh and pppd
- PPTPServer
Debug:
- PPTP Client - Diagnosis HOWTO
- [PPTPD]VPN解决PTY read or GRE write failed问题
Embedded kernel module:
ppp_mppe
ip_gre
Sever can let both client go to internet
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
The command below for reference, because ppp+ can represent for multiple ppp0 ppp1 ppp2 ....
iptables -I INPUT -s 10.10.0.0/24 -i ppp+ -j ACCEPT
Two Client can ping to each other
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
iptables -A FORWARD -i ppp0 -o eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i eth2 -o ppp0 -j ACCEPT
route del default eth2
route add default ppp0
0 意見:
張貼留言