LinuxQuestions.org
Help answer threads with 0 replies.
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 01-24-2010, 08:05 AM   #1
xyzxyzxyz
LQ Newbie
 
Registered: Jan 2010
Posts: 2

Rep: Reputation: 0
IPTABLES: Allow PPTP Server to access the Internet


Hi,

I'm running an own PPTP Server, but I can't get it to access the internet.

All my PCs at home run in the 192.168.0.0/24 net,
the PPTP Server has local IP192.168.0.5 and remote IP 192.168.0.80-99.

The router to the internet is at 192.168.0.1, and the IP of eth0 on the machine where the pptpd runs is 192.168.0.4.


I want to be able to connect to the internet trough that VPN and access my local LAN servers (which works fine so far). I can ping internet and local IPs successfully, but can not access them with a browser, or connect to them in any other way.

I have 'accepted' all in/output and forwards.

I am running a Squid proxy on the same machine, and if I do:
Quote:
iptables -t nat -A PREROUTING -j REDIRECT -i ppp0 -s 192.168.0.0/24 -p tcp --dport 80 --to-port 3128
... I can access the internet through Squid, but of course Jabber/ICQ etc. won't work then because it just refers port 80.

But I want the PPTP Clients to connect to the internet directly, if I don't use that rule it's not possible to load any pages. But pinging works all the time. DNS is also working fine, but I can't even access webpages via IP directly.


So how can I allow the PPTP IPs 192.168.0.80-99 to get direct access to the Internet with Iptables?


Thanks in advance!

Last edited by xyzxyzxyz; 01-24-2010 at 06:43 PM.
 
Old 01-24-2010, 01:31 PM   #2
nimnull22
Senior Member
 
Registered: Jul 2009
Distribution: OpenSuse 11.1, Fedora 14, Ubuntu 12.04/12.10, FreeBSD 9.0
Posts: 1,571

Rep: Reputation: 92
You need to allow "forward" from ppp0 to the outgoing interface and "forward" from the same interface to ppp0.
 
Old 01-24-2010, 06:20 PM   #3
xyzxyzxyz
LQ Newbie
 
Registered: Jan 2010
Posts: 2

Original Poster
Rep: Reputation: 0
I've allowed all input, output and forward traffic, should have mentoined that.

But what do you mean with '"forward" from the same interface to ppp0.' ?


Regards
 
Old 01-24-2010, 06:27 PM   #4
nimnull22
Senior Member
 
Registered: Jul 2009
Distribution: OpenSuse 11.1, Fedora 14, Ubuntu 12.04/12.10, FreeBSD 9.0
Posts: 1,571

Rep: Reputation: 92
Has to be a rules, like:
FORWARD -i eth0 -o ppp0 -j ACCEPT
FORWARD -i ppp0 -o eth0 -j ACCEPT
 
  


Reply


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
Linux PPTP client fails to connect to Microsoft ISA PPTP server dCriminal Linux - Networking 1 10-27-2009 12:33 PM
PPTP server sending the weird PPTP header data in 'Out-going-call-reply' varlu Linux - Networking 0 10-14-2009 06:53 AM
How can I get my PPTP Connection to connect to a Windows Remote Access Server? jamtech Linux - Networking 1 08-03-2007 07:58 PM
internet browsing throught linux pptp server ilnli Linux - Networking 5 08-01-2006 04:16 AM
allow internet access from LAN using IPTABLES cccc Linux - Networking 2 03-24-2006 04:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:53 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration