Skip to contentSkip to conversation

PPTP Question

DISCUSSION Rommy Taslim 7 participants 14 messages Oct 22, 2002 – Oct 23, 2002

lore
Share & tools
lore
#0 lore raw

Hi Everyone,

Just a question, is it possible to have two box of linux OS (both connected to internet with different IP addresses) to do VPN/PPTP masquerading to one PPTP server (Windows 2000 box) inside the LAN ?

I only manage to get it to work with one of them (the one that the Windows 2000 box have a default gateway to).

Thanks in advance !

Rommy

#1 lore raw

nmap

Hi Everyone,

Just a question:
I want to set up a firewall box with iptables in which I can use nmap. Which ports/protocols can I set to ACCEPT and which to DROP?

Thanks in advance !

Antonio

#2 lore raw

Re: nmap

Tue, 22 Oct 2002 17:42:45 +0200, tu as dit :

Quoted 4 lines

Hi Everyone,
Just a question:
I want to set up a firewall box with iptables in which I can use nmap. Which ports/protocols can I set to ACCEPT and which to DROP?

I advise you to set the policy at DROP, and to accept:
* RELATED, ESTABLISHED packets
* NEW packets on the ports you _need_ to open (80 if you host a web server, 22 if you want to allow remote login using ssh and so on).
* ICMP echo-request packets

This is a basic and a simple firewall and should be a good start.

Signature · 5 lines
Gael Le Mignot "Kilobug" - [email protected] - http://kilobug.free.fr
GSM         : 06.71.47.18.22 (in France)   ICQ UIN   : 7299959
Fingerprint : 1F2C 9804 7505 79DF 95E6 7323 B66B F67B 7103 C5DA

Member of HurdFr: http://hurdfr.org - The GNU Hurd: http://hurd.gnu.org
#3 lore raw

Re: nmap

Ok,but in order to set the policy at DROP,which port/protocols I have to set at ACCEPT to allow nmap from firewall box to anywhere nad from LAN to anywhere?

Quoted 23 lines · On Tue, 22 Oct 2002 20:25:11 +0200 [email protected] (Gaël Le Mignot) wrote:

Tue, 22 Oct 2002 17:42:45 +0200, tu as dit :

Quoted 4 lines

Hi Everyone,
Just a question:
I want to set up a firewall box with iptables in which I can use nmap. Which ports/protocols can I set to ACCEPT and which to DROP?

I advise you to set the policy at DROP, and to accept:
* RELATED, ESTABLISHED packets
* NEW packets on the ports you _need_ to open (80 if you host a web server, 22 if you want to allow remote login using ssh and so on).
* ICMP echo-request packets

This is a basic and a simple firewall and should be a good start.

Signature · 5 lines
Gael Le Mignot "Kilobug" - [email protected] - http://kilobug.free.fr
GSM         : 06.71.47.18.22 (in France)   ICQ UIN   : 7299959
Fingerprint : 1F2C 9804 7505 79DF 95E6 7323 B66B F67B 7103 C5DA

Member of HurdFr: http://hurdfr.org - The GNU Hurd: http://hurd.gnu.org
#4 lore raw

Re: nmap

Tue, 22 Oct 2002 21:12:21 +0200, tu as dit :

Quoted 1 line

Ok,but in order to set the policy at DROP,which port/protocols I have to set at ACCEPT to allow nmap from firewall box to anywhere nad from LAN to anywhere?

If you don't block OUTPUT and allow ESTABLISHED and RELATED packets in INPUT, you don't need to open extra ports. Maybe some extra icmp for "weird" scans, that's all.

Signature · 5 lines
Gael Le Mignot "Kilobug" - [email protected] - http://kilobug.free.fr
GSM         : 06.71.47.18.22 (in France)   ICQ UIN   : 7299959
Fingerprint : 1F2C 9804 7505 79DF 95E6 7323 B66B F67B 7103 C5DA

Member of HurdFr: http://hurdfr.org - The GNU Hurd: http://hurd.gnu.org
#5 lore raw

Re: nmap

OK but if I set the policy OUTPUT at DROP which ports/prot I have to set al ACCEPT? This's my problem.

Quoted 16 lines · On Tue, 22 Oct 2002 23:05:39 +0200 [email protected] (Gaël Le Mignot) wrote:

Tue, 22 Oct 2002 21:12:21 +0200, tu as dit :

Quoted 1 line

Ok,but in order to set the policy at DROP,which port/protocols I have to set at ACCEPT to allow nmap from firewall box to anywhere nad from LAN to anywhere?

If you don't block OUTPUT and allow ESTABLISHED and RELATED packets in INPUT, you don't need to open extra ports. Maybe some extra icmp for "weird" scans, that's all.

Signature · 5 lines
Gael Le Mignot "Kilobug" - [email protected] - http://kilobug.free.fr
GSM         : 06.71.47.18.22 (in France)   ICQ UIN   : 7299959
Fingerprint : 1F2C 9804 7505 79DF 95E6 7323 B66B F67B 7103 C5DA

Member of HurdFr: http://hurdfr.org - The GNU Hurd: http://hurd.gnu.org
#6 lore raw

Re: nmap

Wed, 23 Oct 2002 00:35:27 +0200, tu as dit :

Quoted 3 lines

OK but if I set the policy OUTPUT at DROP which ports/prot I have to set al ACCEPT?
This's my problem.

every dport/protocol you want to allow to be scanned... You cannot filter much OUTPUT if you want to allow nmap.

You can use the -m owner with --cmd-owner if it's avaible on your computer to allow "mmap" initiated connections.

But... what do you want to do by filtering OUTPUT ? Sure, you can drop INVALID packets, filter floods, stop packets coming from root and so on, but if you want to allow normal internet activity from the box, you have to allow NEW connections on OUTPUT to any host/port...

Signature · 5 lines
Gael Le Mignot "Kilobug" - [email protected] - http://kilobug.free.fr
GSM         : 06.71.47.18.22 (in France)   ICQ UIN   : 7299959
Fingerprint : 1F2C 9804 7505 79DF 95E6 7323 B66B F67B 7103 C5DA

Member of HurdFr: http://hurdfr.org - The GNU Hurd: http://hurd.gnu.org
#7 lore raw

Re: nmap

Quoted 1 line

But... what do you want to do by filtering OUTPUT ? Sure, you can drop

INVALID

Quoted 1 line

packets, filter floods, stop packets coming from root and so on, but if

you

Quoted 2 lines

want to allow normal internet activity from the box, you have to allow NEW connections on OUTPUT to any host/port...

There's always a (good) chance that someone will comprimise the machine and use it to DDOS, scan, spam etc - filtering output to allow only what you need for normal usage (dns, web, ping etc) makes it less useful as a hacked box.

Gavin

#8 lore raw

Re: nmap

Wed, 23 Oct 2002 12:06:49 +0300, tu as dit :

Quoted 11 lines
Quoted 1 line

But... what do you want to do by filtering OUTPUT ? Sure, you can drop

INVALID

Quoted 1 line

packets, filter floods, stop packets coming from root and so on, but if

you

Quoted 2 lines

want to allow normal internet activity from the box, you have to allow NEW connections on OUTPUT to any host/port...

There's always a (good) chance that someone will comprimise the machine and use it to DDOS, scan, spam etc - filtering output to allow only what you need for normal usage (dns, web, ping etc) makes it less useful as a hacked box.

If you allow users to mail, you allow them to spm. If you allow users to send requests on tcp 80, you allow them to participe in a DDOS, and so on. There is no real way to sort out "clean" and "bad" actions at the firewall level... The only thing you can do is using the 'limit' macth to prevent some kinds of DoS. And allowing only some ports can be very limitating for users, since some web servers listenon other ports, they may want to use cvs pserver (and you didn't think to allow 3128) and so on...

Signature · 5 lines
Gael Le Mignot "Kilobug" - [email protected] - http://kilobug.free.fr
GSM         : 06.71.47.18.22 (in France)   ICQ UIN   : 7299959
Fingerprint : 1F2C 9804 7505 79DF 95E6 7323 B66B F67B 7103 C5DA

Member of HurdFr: http://hurdfr.org - The GNU Hurd: http://hurd.gnu.org
#9 lore raw

Re: nmap

Quoted 3 lines
Quoted 3 lines
Quoted 1 line

But... what do you want to do by filtering OUTPUT ? Sure, you can drop

INVALID

Quoted 1 line

packets, filter floods, stop packets coming from root and so on, but

if

Quoted 2 lines
Quoted 2 lines

you

Quoted 1 line

want to allow normal internet activity from the box, you have to allow

NEW

Quoted 3 lines
Quoted 3 lines
Quoted 1 line

connections on OUTPUT to any host/port...

There's always a (good) chance that someone will comprimise the machine

and

Quoted 1 line
Quoted 1 line

use it to DDOS, scan, spam etc - filtering output to allow only what

you

Quoted 1 line
Quoted 1 line

need for normal usage (dns, web, ping etc) makes it less useful as a

hacked

Quoted 3 lines
Quoted 1 line

box.

If you allow users to mail, you allow them to spm. If you allow users to

send

Quoted 2 lines

requests on tcp 80, you allow them to participe in a DDOS, and so on. There is no real way to sort out "clean" and "bad" actions at the

firewall

Quoted 3 lines

level... The only thing you can do is using the 'limit' macth to prevent some kinds of DoS. And allowing only some ports can be very limitating for users, since some web servers listenon other ports, they may want to

use

Quoted 1 line

cvs pserver (and you didn't think to allow 3128) and so on...

Would I be right in thinking that the OUTPUT chain only filters traffic originating from the firewall box itself, and that any traffic coming from your clients would fall into the FORWARD chain? If that is the case, then filtering OUTPUT would have no effect on your users' ability to surf, mail etc, but only on the firewall box's ability to generate traffic.

Gavin

Quoted 7 lines

Gael Le Mignot "Kilobug" - [email protected] - http://kilobug.free.fr
GSM : 06.71.47.18.22 (in France) ICQ UIN : 7299959
Fingerprint : 1F2C 9804 7505 79DF 95E6 7323 B66B F67B 7103 C5DA

Member of HurdFr: http://hurdfr.org - The GNU Hurd: http://hurd.gnu.org

#10 lore raw

Re: nmap

Quoted 5 lines · Gavin

Would I be right in thinking that the OUTPUT chain only filters traffic originating from the firewall box itself, and that any traffic coming from your clients would fall into the FORWARD chain? If that is the case, then filtering OUTPUT would have no effect on your users' ability to surf, mail etc, but only on the firewall box's ability to generate traffic.

Yes, you are correct in this understanding of what the OUTPUT and FORWARD chains are for, however I believe this thread started by asking about setting up rules in the OUTPUT chain to enable nmap to be used *from the box which the netfilter rules are on*.

Therefore the packets being discussed are all locally generated anyway.

Antony.

Signature · 5 lines
All matter in the Universe can be placed into one of two categories:

1. things which need to be fixed
2. things which will need to be fixed once you've had a few minutes to play 
with them
#11 lore raw

Re: nmap

In reply to antonio
Quoted 5 lines · antonio

Hi Everyone,

Just a question:
I want to set up a firewall box with iptables in which I can use nmap. Which ports/protocols can I set to ACCEPT and which to DROP?

Do you mean you want to run nmap on a box also running netfilter, to scan other machines ?

If so, set your OUTPUT policy to ACCEPT, set your INPUT policy to DROP with a single rule:

iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

and you'll be able to scan other machines and get the replies back, but anything new coming in to your machine will be blocked.

If I didn't understand correctly what you wanted to do please give more details.

Antony.

Signature · 1 line
Which part of 'apt-get dist-upgrade' do you not understand ???
#12 lore raw

Re: nmap

Thank you Antony for your idea.
But...if I set my OUTPUT to DROP which ports and protocols can I set to ACCEPT to rum nmap to allow scan to other machines?

Thx

Quoted 28 lines · On Tue, 22 Oct 2002 19:31:42 +0100 Antony Stone <[email protected]>…
Quoted 5 lines · antonio

Hi Everyone,

Just a question:
I want to set up a firewall box with iptables in which I can use nmap. Which ports/protocols can I set to ACCEPT and which to DROP?

Do you mean you want to run nmap on a box also running netfilter, to scan other machines ?

If so, set your OUTPUT policy to ACCEPT, set your INPUT policy to DROP with a single rule:

iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

and you'll be able to scan other machines and get the replies back, but anything new coming in to your machine will be blocked.

If I didn't understand correctly what you wanted to do please give more details.

Antony.

Signature · 1 line
Which part of 'apt-get dist-upgrade' do you not understand ???
#13 lore raw

Re: nmap

In reply to antonio
Quoted 4 lines · antonio

Hi Everyone,

Just a question:
I want to set up a firewall box with iptables in which I can use nmap.

I would suggest that you don't run nmap from your firewall, that host should just be a firewall and nothing else.

Signature · 1 line
FunkyJesus System Administration Team