Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Forum Archive > Main Support Categories > Networking & Wireless
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Hello, Unregistered You are browsing a READ only archive of the main support categories pre 4/21/2008. You will not be able to post or reply any threads in this section.

Networking & Wireless
Having problems getting connected to the internet or getting your wireless card to work? Ask here.

 
Thread Tools Display Modes
Old March 17th, 2007   #1
zooounds
A Carafe of Ubuntu
 
Join Date: Apr 2006
Location: Stockholm/Sweden
Beans: 95
Ubuntu 7.10 Gutsy Gibbon
Question Make my NAT computer do PPTP VPN pass through

My Ubuntu Edgy computer is a NAT server. How does I make it possible for at least one (but possible many) LAN clients to use a PPTP VPN?

Which kernel modules must I insert? Iptables rules?

Getting panic here ...

Regards
Fredrik
zooounds is offline   Reply With Quote
Old March 17th, 2007   #2
koenn
Chocolate-Covered Ubuntu Beans
 
Join Date: Nov 2006
Location: Belgium
Beans: 2,108
Ubuntu 8.04 Hardy Heron
Re: Make my NAT computer do PPTP VPN pass through

pptp passes through nat transparently, i.e. if you allow everything out, and established in, it should work. If you want it more secure, you can specify ip addresses of servers you want to connect to, and port numbers (look up what ports pptp uses).
koenn is offline   Reply With Quote
Old March 18th, 2007   #3
zooounds
A Carafe of Ubuntu
 
Join Date: Apr 2006
Location: Stockholm/Sweden
Beans: 95
Ubuntu 7.10 Gutsy Gibbon
Re: Make my NAT computer do PPTP VPN pass through

Quote:
Originally Posted by koenn View Post
pptp passes through nat transparently, i.e. if you allow everything out, and established in, it should work. If you want it more secure, you can specify ip addresses of servers you want to connect to, and port numbers (look up what ports pptp uses).
That does not work for me.

The VPN works fine if I'm not behind NAT.

Are you sure there are no kernel modules (conntrack etc) that are needed?
zooounds is offline   Reply With Quote
Old March 18th, 2007   #4
koenn
Chocolate-Covered Ubuntu Beans
 
Join Date: Nov 2006
Location: Belgium
Beans: 2,108
Ubuntu 8.04 Hardy Heron
Re: Make my NAT computer do PPTP VPN pass through

According to the documentation, al you need is to allow traffic towards the vpn you're connecting to (tcp port 1743) + allow the replies ('established') and it will be NATed no problem.

I checked my NAT box and it does have contrack installed - i probably included it when first installing iptables, so I can't verify if it would work without. I think you only need contrack if your iptables uses 'state' such as 'related'.
koenn is offline   Reply With Quote
Old March 18th, 2007   #5
zooounds
A Carafe of Ubuntu
 
Join Date: Apr 2006
Location: Stockholm/Sweden
Beans: 95
Ubuntu 7.10 Gutsy Gibbon
Re: Make my NAT computer do PPTP VPN pass through

Quote:
Originally Posted by koenn View Post
According to the documentation, al you need is to allow traffic towards the vpn you're connecting to (tcp port 1743) + allow the replies ('established') and it will be NATed no problem.

I checked my NAT box and it does have contrack installed - i probably included it when first installing iptables, so I can't verify if it would work without. I think you only need contrack if your iptables uses 'state' such as 'related'.
So none of these are needed?

ip_conntrack_pptp
ip_conntrack_proto_gre
ip_nat_pptp
ip_nat_proto_gre

I still can't get it to work
zooounds is offline   Reply With Quote
Old March 18th, 2007   #6
koenn
Chocolate-Covered Ubuntu Beans
 
Join Date: Nov 2006
Location: Belgium
Beans: 2,108
Ubuntu 8.04 Hardy Heron
Re: Make my NAT computer do PPTP VPN pass through

I only have these, and a working pptp :
Code:
stargate:~# lsmod
Module                  Size  Used by    Not tainted
ipt_MASQUERADE          1216   1
ipt_state                608   2
iptable_filter          1728   1
iptable_nat            12628   3  [ip_nat_ftp ip_nat_irc ipt_MASQUERADE ipt_REDIRECT]
ip_conntrack           12652   4  [ip_conntrack_ftp ip_conntrack_irc ip_nat_ftp ip_nat_irc ipt_MASQUERADE ipt_REDIRECT ipt_state iptable_nat]
ip_tables              10432  21  [ipt_LOG ipt_MARK ipt_MASQUERADE  ....
what else can I say ?
koenn is offline   Reply With Quote
Old March 18th, 2007   #7
zooounds
A Carafe of Ubuntu
 
Join Date: Apr 2006
Location: Stockholm/Sweden
Beans: 95
Ubuntu 7.10 Gutsy Gibbon
Re: Make my NAT computer do PPTP VPN pass through

I'm just curious; where comes GRE into the picture?
zooounds is offline   Reply With Quote
Old March 18th, 2007   #8
koenn
Chocolate-Covered Ubuntu Beans
 
Join Date: Nov 2006
Location: Belgium
Beans: 2,108
Ubuntu 8.04 Hardy Heron
Re: Make my NAT computer do PPTP VPN pass through

GRE does the encaptulation of packages that are send after the pptp connection is established.

Quote:
After the PPTP control session has been established, GRE is used to encapsulate the data or payload in a secure manner
this explains it further : http://support.microsoft.com/kb/241251. On the diagram you'll see that the IP header sits on top of the GRE packer. The IP header holds source and destination address, which is changed during the NAT proces. So NAT doesn't affect it - unless you're running multiple pptp sessions. In that case, the NAT may get confused about which package belongs to what session - I think the contrack pptp and contrack gre modules are meant to handle that.
koenn is offline   Reply With Quote
Old March 18th, 2007   #9
koenn
Chocolate-Covered Ubuntu Beans
 
Join Date: Nov 2006
Location: Belgium
Beans: 2,108
Ubuntu 8.04 Hardy Heron
Re: Make my NAT computer do PPTP VPN pass through

Quote:
My Ubuntu Edgy computer is a NAT server. How does I make it possible for at least one (but possible many) LAN clients to use a PPTP VPN?
I understood this correctly that the Ubuntu Edgy computer acts as a router and uses NAT to provide internet access or some other form of connectivity to 1 (or more) hosts (computers) on your LAN - and that these hosts will set up pptp sessions with servers elsewhere through the Ubuntu Edgy machine. So they do not setup pptp vpn with that ubuntu machine, right ?
koenn is offline   Reply With Quote
Old March 18th, 2007   #10
zooounds
A Carafe of Ubuntu
 
Join Date: Apr 2006
Location: Stockholm/Sweden
Beans: 95
Ubuntu 7.10 Gutsy Gibbon
Re: Make my NAT computer do PPTP VPN pass through

Quote:
Originally Posted by koenn View Post
I understood this correctly that the Ubuntu Edgy computer acts as a router and uses NAT to provide internet access or some other form of connectivity to 1 (or more) hosts (computers) on your LAN - and that these hosts will set up pptp sessions with servers elsewhere through the Ubuntu Edgy machine. So they do not setup pptp vpn with that ubuntu machine, right ?
Correct.

Actually, the hosts on the "LAN" is virutal machines running on the Edgy computer. But the behave like they are sitting on a LAN.

But what could go wrong then? I have no firewall rules at all. Si there any way to se what happens when the client connects to the VPN?
zooounds is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:57 AM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry