Thread: vpn server
View Single Post
  #2 (permalink)  
Old 01-24-2010, 04:40 PM
XYYHun XYYHun is offline
Junior Member
 
Join Date: Jan 2010
Posts: 2
Default

If u choose Xen platform, u can setup a vpn server without rebuild kernel.
Follow these steps. (My OS is ubuntu)
1. apt-get install pptpd
2. vi /etc/pptpd.conf
uncomment these lines
localip 192.168.0.1
remoteip 192.168.0.234-238,192.168.0.245
3. vi /etc/ppp/chap-secrets
add vpn users and passwords in this format, replace [username] and [password] of yours.
[username] pptpd [password] *
(ps: * means allowed all address.)
4. vi /etc/ppp/options
modify these lines
ms-dns 208.67.222.222
ms-dns 208.67.220.220
(ps: u can choose other DNS servers u like)
5. vi /etc/sysctl.conf
uncomment this line.
net.ipv4.ip_forward=1
6. restart your vps.
7. enter these commands
iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth0 -j MASQUERADE
iptables -I FORWARD -p tcp --syn -i ppp+ -j TCPMSS --set-mss 1356
Reply With Quote