Advertisement
shokti

ubuntu server pptp vpn server (pptpd or poptop) installation

Sep 13th, 2012
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. install pptpd:
  2. sudo apt-get install pptpd
  3.  
  4. edit /etc/pptpd.conf file:
  5. sudo nano /etc/pptpd.conf
  6.  
  7. put the following entry below. localip is the ip address of the server & remoteip is the range of ip address you want the remote pc to have when connecting:
  8. localip 192.168.1.250
  9. remoteip 192.168.1.160-200,192.168.1.199
  10.  
  11. edit /etc/ppp/pptpd.options:
  12. sudo nano /etc/ppp/pptpd-options
  13.  
  14. make sure to put the value below and must be uncommented:
  15. require-mschap-v2
  16. ms-dns 8.8.8.8
  17. nobsdcomp
  18. noipx
  19. mtu 1444
  20. mru 1444
  21.  
  22.  
  23. edit /etc/ppp/chap-secrets:
  24. sudo nano /etc/ppp/chap-secrets
  25.  
  26. put the username and passwords of the remote users that will connect. make sure that the users have a user account on the server.
  27. # Secrets for authentication using CHAP
  28. # client server secret IP addresses
  29. YOUR_USERNAME_HERE pptpd YOUR_PASSWORD_HERE *
  30.  
  31. to enable remote users to access other computers on the network or be able to surf the internet through the vpn tunnel then edit /etc/sysctl.conf:
  32. sudo nano /etc/sysctl.conf
  33.  
  34. set the value below:
  35. net.ipv4.ip_forward=1
  36.  
  37. restart the server:
  38. sudo reboot
  39.  
  40. =============================================================================================
  41.  
  42. if the remote client still have problem connecting to internet, then set up ip-masquerading in /etc/rc.local:
  43. sudo nano /etc/rc.local
  44.  
  45. Add the following lines above the line that says ‘exit 0‘
  46. iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement