LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 04-26-2005, 11:22 AM   #1
09kevin77
LQ Newbie
 
Registered: Mar 2005
Location: Moncton NB Canada
Distribution: Fedora
Posts: 15

Rep: Reputation: 0
Unhappy Win2000 PPTP behind IPTables


Hey all,

I currently have a 2000 DC that is now going to act as a PPTP server (I know, but until Samba comes out with Group Policies I am stuck). It is all configured and ready to go. I tested it internally and everything works. Now my problem is that I can't connect to it from the outside world through a RedHat 7.2 IPTables firewall.

These are the rules I have added. Keep in mind I am fairly new to IPTables. I will be eventually going to 9.0, but for now, this is what I got:

iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp -d <external IP> --dport 1723 -j DNAT --to-destination 192.168.0.5:1723
iptables -A FORWARD -i eth0 -o eth1 -p tcp -d 192.168.0.5 --destination-port 1723 -j ACCEPT

iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp -d <external IP> --dport 47 -j DNAT --to-destination 192.168.0.5:47
iptables -A FORWARD -i eth0 -o eth1 -p tcp -d 192.168.0.5 --destination-port 47 -j ACCEPT

eth0 is external and eth1 is internal. No DMZ. Don't need it.

Everything else is working the very best. Just to know, the command to restart iptables is , service iptables restart right? Nothing else to enter?

Thanks all for the help.

Kevin
 
Old 04-26-2005, 12:51 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,760

Rep: Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931
It is protocol 47 not port 47. gre is another name for protocol 47

iptables -t nat -A PREROUTING -i eth0 -p 47 -j DNAT --to-destination 192.168.0.5
iptables -A FORWARD -p gre -d 192.168.0.5 -j ACCEPT

Quote:
service iptables restart
is the correct command. If the current rules were not saved then restarting will only reload the old ones.
 
Old 05-02-2005, 09:11 AM   #3
09kevin77
LQ Newbie
 
Registered: Mar 2005
Location: Moncton NB Canada
Distribution: Fedora
Posts: 15

Original Poster
Rep: Reputation: 0
Thanks michaelk,

I am sorry I didn't write in sooner, I have been soooo busy. That worked 100%. Thanks a lot.
 
  


Reply



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
IPTABLES and GRE PPTP working jbrandis Linux - Security 3 10-27-2005 10:15 AM
Pptp Vpn Iptables jrmann1999 Linux - Networking 1 08-20-2004 11:26 AM
IPTABLES and PPTP Traffic pssst_yeah_you Linux - Security 2 07-27-2004 05:31 PM
iptables and pptp vpn SSBN Linux - Networking 6 06-03-2003 02:35 PM
PPTP hell (IPtables) steppin_razor Linux - Networking 6 02-05-2002 06:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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

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