Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue Jun 21, 2011 6:33 pm 
Offline
Newbie

Joined: Fri May 14, 2010 10:15 am
Posts: 4
Website: http://alan.edward.es/
Location: Sheffield, UK
I am trying to setup a VPN tunnel from my Windows 7 box to my Linode, with the end goal of being able to host servers using my Linode's public IP via forwarded ports.

I've got so far with PPTPD, but I just can't get it to work. My Windows 7 client connects okay, but my Linode doesn't seem to supply it with a gateway IP address, so it can't use the Internet:

Image

I added the iptables gre traffic and allowed TCP port 1723, but ended up allowing everything through - to no avail.

I've tried connecting using my Android phone too, but the same thing happened - I couldn't browse the internet.

So below are the configuration files that I'm using:

/etc/ppp/pptpd-options: http://dpaste.com/hold/557152/
/etc/pptpd.conf: http://dpaste.com/hold/557157/ (got a feeling I fudged up localip and remoteip here)
/var/log/syslog: http://dpaste.com/hold/557161/ (debug output from a connection attempt)

I'm not sure if any others will be of use, but if there are any let me know.

Should add that I've edited
Code:
sysctl.conf
and set
Code:
net.ipv4.ip_forward = 1
.

Thanks :)


Top
   
 Post subject:
PostPosted: Wed Jun 22, 2011 10:27 am 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
While this is not specifically helpful to your problem (and I apologize for that), it looks like you're using the wrong tool for this. PPTP is pretty uncommon these days due to the difficulty of configuration compared to other solutions, the use of GRE rather than TCP or UDP (GRE has no ports, so NAT forwarding is difficult), etc.

SSH tunnels, for example, enable you to do what you describe with almost no effort at all, without worrying about routing; just forward a port (say, 80) on your server to a port (say, 80) on your local machine; clients connecting to port 80 on your server will be served from your desktop, and you can use compression on the SSH tunnel to boot.


Top
   
 Post subject:
PostPosted: Wed Jun 22, 2011 2:41 pm 
Offline
Newbie

Joined: Fri May 14, 2010 10:15 am
Posts: 4
Website: http://alan.edward.es/
Location: Sheffield, UK
Okay, thanks for the response.

Could you point me in the direction of a guide on how to do that? :o I've tried searching - but guides I've found (even on the Linode library) just cover how to make it so you can access remote ports locally instead of the other way around.

If anyone can suggest anything for PPTP that would be great, but if I can get SSH tunnelling working I can live with that!


Top
   
 Post subject:
PostPosted: Wed Jun 22, 2011 4:51 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Give this a whirl, I found it after a quick google http://www.jonlee.ca/how-to-secure-your ... ith-putty/

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject:
PostPosted: Wed Jun 22, 2011 6:08 pm 
Offline
Newbie

Joined: Fri May 14, 2010 10:15 am
Posts: 4
Website: http://alan.edward.es/
Location: Sheffield, UK
Thanks.

That guide is just like the other guides I found though - I'm not particularly wanting to browse the Internet using my Linode's connection, rather allow people to connect to a port on my Linode and have that forwarded to my local computer.

Is that possible using SSH tunnelling?

That's why I was trying to setup a PPTP VPN, I recently moved and am using an Internet connection that shares the same IP with the entire block - which is fine for normal web browsing, but if I want to host a web server for testing locally and allow people to connect to it (for example) I can't.


Top
   
 Post subject:
PostPosted: Wed Jun 22, 2011 6:21 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Ah sorry mis-read, in a linux environment I'd simply suggest tunnelling backwards, however I've no idea how to do that on windows since I don't use it. Maybe someone here who has more experience with windows can help.

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject:
PostPosted: Thu Jun 23, 2011 11:02 am 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
Using PuTTY, one of the more common SSH tools for Linux:

http://www.cs.uu.nl/technical/services/ ... ttyfw.html

That's for a forward tunnel rather than reverse, but the idea is similar.

PuTTY tends to be a bit more short-term (doesn't reconnect if connection is lost, shows up in the taskbar), but there are other clients intended for long-term tunnels or connections.

One kind of hacked-up solution to that might be putting plink in a batch script that infinitely loops, assuming plink will terminate when the connection is lost.

A more proper permanent solution might be autossh in cygwin, ptunnel, tunnelier, etc.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group