Please enter your e-mail address & password to login to the VPS.net customer portal

Our VPS Cloud Community



Go Back   VPS.NET Forums » Public Forums » Tutorials and How-To's
Reply
 
Thread Tools
  #1  
Old 09-15-2009, 10:54 AM
uk2 uk2 is offline
Junior Member
 
Join Date: Sep 2009
Posts: 4
uk2 is on a distinguished road
Exclamation How-to: VPN server for hulu.com and bbc.com/iplayer

Here is a very simply straight out of the
box VPN server that works at once (at least on a mac)
for hulu and iplayer.



==========================================
SETTING UP VPS.NET SERVER AS A VPN SERVER
==========================================

For using hulu.com select a VPS on the US cluster
For using bbc.com/iplayer select a VPS on the UK cluster

Create a new virtual machine on VPS.NET

Select "Ubuntu 8.04 LTS 64-bit Basic Installation"

For this instructions we assume your virtual server has IP: 83.170.XXX.XXX
(replace with the real ip number everywhere

And login as root

Following these commands and instructions

==== Update ubuntu ====

Code:
apt-get update
apt-get upgrade
apt-get install joe
apt-get install pptpd
Code:
joe /etc/pptpd.conf
localip 192.168.0.1
remoteip 192.168.0.2-254
hold ctrl and press k-x to save

==== Insert the name servers for ns1.uk2.net and ns2.uk2.net ====

Code:
joe /etc/ppp/pptpd-options
ms-dns 83.170.64.2
ms-dns 83.170.69.2
hold ctrl and press k-x to save

==== Create 2 test users ====

Code:
joe /etc/ppp/chap-secrets
user1 pptpd password1 *
user1 pptpd password2 *
hold ctrl and press k-x to save

==== Setup routing for vpn server ====

Code:
joe /etc/sysctl.conf
net.ipv4.ip_forward=1
hold ctrl and press k-x to save

Code:
joe /etc/rc.local (insert before exit 0 and replace 83.XXX.XXX.XXX with your VPS IP number)
iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -d ! 192.168.0.0/24 -j SNAT --to-source 83.XXX.XXX.XXX
hold ctrl and press k-x to save

==== Restart and we are done ====

Code:
shutdown -r now
Now you can login with VPN over PPTP with
user1/password1 or user2/password2

Last edited by uk2; 09-15-2009 at 02:09 PM.
Reply With Quote
  #2  
Old 09-15-2009, 02:12 PM
uk2 uk2 is offline
Junior Member
 
Join Date: Sep 2009
Posts: 4
uk2 is on a distinguished road
Default VPN on MAC OSX

MAC OSX SETUP

Goto System Preferences and click Network
Click + in lower left corner to add new service
Select Interface VPN / VPN Type PPTP / Service Name put whatever you want



Enter the IP number of your VPS.NET server or hostname if you have set that up like myvpn.mydomain.com
Enter user1 or the username you made above in /etc/ppp/chap-secrets



Enter the password from /etc/ppp/chap-secrets



Tick the Show VPN status in menu bar and now click Advanced...



On the options page. Click "Send all traffic over VPN connection"
otherwise hulu.com and bbc inlayer will not work.



Click OK and now you can click Connect from this menu or from the menubar.

Happy watching….
Reply With Quote
  #3  
Old 09-15-2009, 02:40 PM
dave dave is offline
Administrator
 
Join Date: Jan 2009
Posts: 29
dave has disabled reputation
Default

Any specific reason to use joe rather than the preinstalled nano?
Reply With Quote
  #4  
Old 09-15-2009, 02:53 PM
uk2 uk2 is offline
Junior Member
 
Join Date: Sep 2009
Posts: 4
uk2 is on a distinguished road
Default

Yes. I like joe and I needed to make sure that no step can go wrong. Perhaps someone chooses some other distribution that does have an editor or whatever.
Reply With Quote
  #5  
Old 09-15-2009, 03:08 PM
Ditlev Ditlev is offline
The Cloud Keeper
 
Join Date: Feb 2009
Posts: 1,593
Ditlev is on a distinguished road
Send a message via ICQ to Ditlev Send a message via MSN to Ditlev Send a message via Skype™ to Ditlev
Default

joe is good, so is nano - I can't agree with VI though...
__________________
a node a day keeps the doctor away...


http://twitter.com/ditlev/ <- follow me on Twitter!
Join the VPS.NET group on LinkedIN

Reply With Quote
  #6  
Old 09-16-2009, 06:16 AM
geniosity's Avatar
geniosity geniosity is offline
a.k.a. James
 
Join Date: May 2009
Posts: 246
geniosity is on a distinguished road
Default

WHAAAAAAAT!?!

vi ROCKS!!!

:-)
__________________
geniosity at play
Reply With Quote
  #7  
Old 09-16-2009, 08:00 AM
envygeeks envygeeks is offline
I Got Nodes
 
Join Date: May 2009
Posts: 868
envygeeks is on a distinguished road
Default

What Geniosity said. Vim is the shizzle.
__________________
http://www.envygeeks.com/
EnvyGeeks ~ Toll Free: 1-877-670-GEEK
Reply With Quote
  #8  
Old 09-16-2009, 08:04 AM
Ditlev Ditlev is offline
The Cloud Keeper
 
Join Date: Feb 2009
Posts: 1,593
Ditlev is on a distinguished road
Send a message via ICQ to Ditlev Send a message via MSN to Ditlev Send a message via Skype™ to Ditlev
Default

vim is for geeks
__________________
a node a day keeps the doctor away...


http://twitter.com/ditlev/ <- follow me on Twitter!
Join the VPS.NET group on LinkedIN

Reply With Quote
  #9  
Old 09-16-2009, 09:01 AM
nullmind's Avatar
nullmind nullmind is offline
no title
 
Join Date: Feb 2009
Posts: 2,104
nullmind has disabled reputation
Default

VI is the stuff !! .. cant use nothing else
__________________
Carlos Rego
onApp
Secret Sauce Cook
Reply With Quote
  #10  
Old 09-16-2009, 10:08 AM
Ditlev Ditlev is offline
The Cloud Keeper
 
Join Date: Feb 2009
Posts: 1,593
Ditlev is on a distinguished road
Send a message via ICQ to Ditlev Send a message via MSN to Ditlev Send a message via Skype™ to Ditlev
Default

we converted this howto into a Debian template image that we will release this week. So you will be ready to deploy VPN servers on the fly as you need them
__________________
a node a day keeps the doctor away...


http://twitter.com/ditlev/ <- follow me on Twitter!
Join the VPS.NET group on LinkedIN

Reply With Quote
Reply

Thread Tools

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to access remote MySQL Server from Apache Web Server? bestvpscloud General Discussion 19 11-06-2009 01:07 PM