At this moment, my designer encounter problem to access target.com, an online shopping website to see some of the stuff for their design work. Target.com only allowed connections from USA and Canada at this moment due to their website crash issue last couple of weeks. Since this is quite urgent, I need to setup a VPN server so they can use it as a jump point to access websites in USA and Canada. I will use my MySQL server to serve as VPN server as well.
In this tutorial, I will use pptp as protocol to connect to VPN server using a username and password, with 128 bit MPPE encryption. Variable as below:
OS: CentOS 6 64bit
VPN server: 10.10.0.1
VPN client IP: 10.10.0.100 - 199
1. Install ppp, pptp :
2. Once installed, open /etc/pptpd.conf using text editor and add following line:
3. Open /etc/ppp/options.pptpd and add authenticate method, encryption and DNS resolver value:
4. Lets create user to access the VPN server. Open /etc/ppp/chap-secrets and add the user as below:
5. We need to allow IP packet forwarding for this server. Open /etc/sysctl.conf via text editor and change line below:
6. Run following command to take effect on the changes:
7. Allow IP masquerading in IPtables by executing following line:
Update: Once you have done with step 8, check the rules at /etc/sysconfig/iptables. Make sure that the POSTROUTING rules is above any REJECT rules.
8. Start the server:
Once the server is online after reboot, you should now able to access the PPTP server from the VPN client. You can monitor /var/log/messages for ppp and pptpd related log. Cheers!
댓글 없음:
댓글 쓰기