顯示具有 pptp 標籤的文章。 顯示所有文章
顯示具有 pptp 標籤的文章。 顯示所有文章

2012年9月23日 星期日

debian / ubuntu vpn / pptp client

# apt-get install pptp-linux


# vi /etc/ppp/chap-secrets

username PPTP password *

# vi /etc/ppp/peers/myvpn
pty "pptp vpn.domain.com --nolaunchpppd"
name username  # 對應到 /etc/ppp/chap-secrets
remotename PPTP
require-mppe-128
file /etc/ppp/options.pptp
ipparam myvpn


連接:
# pon myvpn



# pon myvpn debug dump logfd 2 nodetach  # with debug


添加路由表:
# route add -net 192.168.8.0/24 dev ppp0
# route add default gw 192.168.8.254 device ppp0



Reference :
PPTP Client
Linux configure point to point tunneling PPTP VPN client for Microsoft PPTP vpn server

Linux VPN pptp dev / ip forward

# iptables -A FORWARD -i tun0 -o tun0 -j ACCEPT # vpn to vpn
# iptables -A FORWARD -i tun0 -o eth0 -j ACCEPT # vpn to ethernet
# iptables -A FORWARD -i eth0 -o tun0 -j ACCEPT # ethernet to vpn




Reference :
iptables - Linux IP Forwarding for OpenVPN - correct firewall setup? - Server Fault