LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 10-29-2006, 06:02 AM   #1
cogo
LQ Newbie
 
Registered: Oct 2006
Location: Norway
Distribution: Ubuntu
Posts: 3

Rep: Reputation: 0
Enabling vpn/pptp in a linux gateway


I have set up a linux gateway at home that other computers use where eth0 is connected to the internet and eth1 is connected to my home network. I am having some problems with vpn connetions though. Below is what I do when I start the gateway script:
Code:
echo 1 > /proc/sys/net/ipv4/ip_forward

iptables -A POSTROUTING -t nat -o eth0 -s 192.168.1.0/24 -d 0/0 -j MASQUERADE
iptables -A FORWARD -t filter -i eth1 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -t filter -i eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT
I am not even sure if all that is neccessary. Anyway, I also do modprobe with the following modules:
Code:
ip_nat_irc
ip_conntrack_irc
ip_nat_pptp
ip_conntrack_pptp
Does anyone here know what else that I need to do to make my gateway support vpn stuff? Please keep in mind that I am by no means an advanced user. btw ... There are both windows and linux machines on my network.
 
Old 10-29-2006, 06:17 AM   #2
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
pptp uses tcp 1723 and GRE (protocol 47)
so add the following rules and try
iptables -I FORWARD -i eth1 -p 47 -j ACCEPT
iptables -I FORWARD -i eth1 -p tcp --dport 1723 -j ACCEPT

i hope it will help
 
Old 10-29-2006, 06:53 AM   #3
cogo
LQ Newbie
 
Registered: Oct 2006
Location: Norway
Distribution: Ubuntu
Posts: 3

Original Poster
Rep: Reputation: 0
It does not work with those modifications. I can not figure out which log to look at either. I can not see that any of the logs in /var/log changes when the clients try to connect to the vpn I am trying to access...
 
Old 10-30-2006, 01:41 AM   #4
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
i use pptpd server on some linux gateways, also some of my clients behind linux firewall. it is enough to allow tcp 1723 and GRE, it works well here. make sure your pptp server is accepting GRE and tcp 1723
and u might want to check http://pptpclient.sourceforge.net/howto-diagnosis.phtml


good luck
 
  


Reply

Tags
gateway, vpn


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need this vpn (pptp) tut for windows ported to linux in easy instructions :p cDizzle Linux - Networking 2 07-23-2006 10:00 PM
How to install vpn - client (pptp) for Suse Linux. vadimkovalev Linux - Newbie 2 10-01-2005 01:27 PM
How to install vpn - client (pptp) for Linux. vadimkovalev Linux - Networking 1 09-30-2005 01:42 AM
PPTP vpn, windows to linux Syncrm Linux - Networking 1 12-25-2003 12:05 PM


All times are GMT -5. The time now is 08:05 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration