PPTP Setup and Troubleshooting with Ubuntu Server 10.04 Server CONSOLE

If your looking for OpenVPN, your in the wrong place. There are multiple places on the interweb for such things, this is specific to Linux (and variations thereof, including DD-WRT)

You can probably also do this with a GUI, but I'm not in favour of weighing down my server with things like that.

Things you will need:
IPV4 settings (Gateway, IP, DNS)
PPTP VPN Server Name
PPTP VPN Username
PPTP VPN Password

As for a PPTP provider, I'm currently using StrongVPN (www.strongvpn.com), but their service is a bit lacking. If your looking for support on DD-WRT, there may be up to a 14 day delay before you get a response. That response isn't really troubleshooting, so much as try random things and hopefully it works.

Step 1:
You need to ensure that you can actually get to the PPTP server your trying to connect to.

1) Test Your Gateway:
a) Open a console

b) Ping your gateway
# ping

c) Ping your VPN server
# ping

d) Telnet to port 1723 on the VPN server
# telnet 1723

If your failing any of these basic connectivity tests, consult your system administrator / ISP / google / local IT guy for more help.

2) Install and configure PPTP, and squid3

a) For Ubuntu, this would be:
# apt-get install pptp-linux
# apt-get install squid3

b) Configure the following files:
For PPTP:
/etc/ppp/options.pptp
/etc/ppp/peers/
/etc/ppp/chap-secrets

For Squid3:
/etc/squid3/squid.conf

c) Enable IPv4 forwarding:
change the /etc/sysctl.conf file and change net.ipv4.ip_forward to 1. (Or echo into the proc node for immediate results)

4) You might want to reboot to make sure all your settings work after reboot

3) Start the PPTP connection
# pptp call

4) Check the ifconfig to ensure that you have a new ppp interface:
ppp0 Link encap:Point-to-Point Protocol
inet addr:11.111.111.11 P-t-P:11.111.111.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1396 Metric:1
RX packets:1267387 errors:0 dropped:0 overruns:0 frame:0
TX packets:472766 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:912180398 (912.1 MB) TX bytes:39448869 (39.4 MB)

5) Ensure you can ping the P-t-P interface:
# ping 11.111.111.1

6) Setup your routing to use the PPTP server instead
#route add default gw 11.111.111.1

7) Setup your clients, and enjoy your proxy. You may use squid as a proxy, or use the new linux server as a gateway.

I've got a script with about 500 lines of code that does all this for you, but in the event that I loose it, this is the basis for the script.

Comments

Popular posts from this blog

Webex Support with Windows 7

Upgrading to the Marlin firmware on the Anycubic Mega S

Installing TinyCore 8x Linux to the Hard Drive via Command Line