Skip to contentSkip to conversation

Filtering using port+process (i.e. open port 80 for Apache only)

DISCUSSION Moath A. Khalaf 3 participants 3 messages Feb 29, 2004 – Mar 3, 2004

lore
Share & tools
lore
#0 lore raw

Hi,

How can I filter using a port and allow some processes to
pass this filter. For example, I want to add a rule that
does not accept a connection on port 80 to any process

other than Apache web server.

Regards

__________________________________
Do you Yahoo!?
Get better spam protection with Yahoo! Mail.
http://antispam.yahoo.com/tools

#1 lore raw
Quoted 6 lines · Moath A. Khalaf

Hi,

How can I filter using a port and allow some processes to pass this filter. For example, I want to add a rule that does not accept a connection on port 80 to any process other than Apache web server.

Is the Apache web server running on the machine with the filtering rules?

If so, then it will be the only process bound to port 80, and nothing else can
receive packets to this port anyway. Therefore you have no problem.

If the web server is running on another machine and you are talking about a forwarding (routing) firewall, the only solution to your requirement is a
proxy server such as Squid. Netfilter cannot tell what sort of traffic is
going to port 80 - it operates at the network layer, not the application layer.

Regards,

Antony.

Signature · 5 lines
This is not a rehearsal.
This is Real Life.

                                                     Please reply to the list;
                                                           please don't CC me.
#2 lore raw
In reply to Moath A. Khalaf

http://netfilter.org/patch-o-matic/pom-extra.html#pom-extra-owner-socketlookup should help

Quoted 18 lines · Moath A. Khalaf

Hi,

How can I filter using a port and allow some processes to
pass this filter. For example, I want to add a rule that
does not accept a connection on port 80 to any process

other than Apache web server.

Regards

__________________________________
Do you Yahoo!?
Get better spam protection with Yahoo! Mail.
http://antispam.yahoo.com/tools