Re: [fw-wiz] Best way to block incoming connections from open httpproxy servers?



Hi,

I've actually written a more detailed posting.

Here it is.

Hi List,

How can I block people from making http connections to an internal
webserver when they are using open http proxies?

While I think that open http proxies are an excellent tool for surfing
the web anonymously and I often use them, they also present me with a
big problem.

I run a small forum, and don't have a good way of keeping users who
are banned for flaming, not following the rules, and other bad conduct
on the forums from returning and re-registering new accounts when
using open http proxies.

The web server is a Gentoo linux box and has packet filtering
(netfilter code), etc built into the kernel. I have the iptables
userspace ebuild installed.

At the moment, I've added rules to the proxies chain which is checked
by the input chain to stop inbound connections from proxy servers
based on the source ports being used by the remote proxy server.
However, this does not seem to be working at the moment.

For example.

iptables -N proxies
iptables -A INPUT -j proxies
iptables -I proxies -p tcp -i eth0 --sport 3128 -j DROP

I also have rules for all of the other common proxy server ports in
place in the proxies chain.

I'm guessing that this does not work because the source port is randomized.

To test this I configured firefox to use an open http proxy running
squid on port 3128 and then connected to the remote site with
wireshark running on the web server.

In the packet dump, the http traffic does not come from or go to port
3128. It seems that this port is never used for incoming our outgoing
source or destination ports.

My next thought is to use the excellent linblock perl script to just
load lists of IP's of known proxy servers into iptables, and then
setup a cron job to automate the whole thing every so often, but after
thinking about this for a bit, I'm wondering how I'm going to keep up
with the changes. Often times a proxy will be there one day and gone
the next and another system will replace it. The web server has
limited amounts of ram, and it would be exhausted after trying to load
x amount of addresses. Can snort be used to detect incoming
connections from open http proxy servers? Is there a pre-processor
that can be turned on to kick off an alert to the alert file?

I'm also having trouble finding an updated proxy list that I can use
with linblock. One of my favorite sites, bluetack, no longer has
anyone maintaining the proxy list.

I'm wondering, what's the best way to keep people using proxy servers
from connecting to the site. Is there a good way to do this with out
having to load thousands of rules to block each particular proxy?

I would greatly appreciate advice on how to handle this situation,
especially from forum admin types who have experience with this
problem.

WhiteHat237

On 5/23/07, lordchariot@xxxxxxxxxxxxxx <lordchariot@xxxxxxxxxxxxxx> wrote:

Trying to enumerate the bad IP addresses with open proxies is a loosing
battle. I have school kids setting up their own https anonymous proxies to
get past the school's filtering system. And they are on a DHCP address with
dynamicDNS which they reset every night so it's different the next day when
they go to school.
Way too much maintenance for me.
Their may be some comprehensive lists of proxies out there, but none that I
find very well-maintained.

Are you trying to prevent external users from anonymizing themselves when
they hit your site?
You might be able to do it with a reverse proxy of some sort that looks at
various characteristics of the request headers and have rules to restrict if
there are X-Proxy-Via: or are missing a standard User-Agent: headers.

Explain why you are trying to block them and we might have some other ideas.


________________________________

From: firewall-wizards-bounces@xxxxxxxxxxxxxxxxxxxxx
[mailto:firewall-wizards-bounces@xxxxxxxxxxxxxxxxxxxxx] On Behalf Of Chris
Smith
Sent: Monday, May 21, 2007 17:16
To: firewall-wizards@xxxxxxxxxxxxxxxxxxxxx
Subject: [fw-wiz] Best way to block incoming connections from open httpproxy
servers?



Hi All.



What's the recommended way to maintain a list of public, open http proxies
and block them from making inbound connections to an http server with
iptables?



I have linblock http://www.dessent.net/linblock/ which I use for a few other
lists. Is there a regularly updated list out there for open http proxies
that can be used for this purpose?



I'm hoping I can retrieve a text file with the IP's every day with a cron
job and let linblock update an IPTables chain. Perhaps there's a better
way?



csmith


_______________________________________________
firewall-wizards mailing list
firewall-wizards@xxxxxxxxxxxxxxxxxxxxx
https://listserv.icsalabs.com/mailman/listinfo/firewall-wizards

_______________________________________________
firewall-wizards mailing list
firewall-wizards@xxxxxxxxxxxxxxxxxxxxx
https://listserv.icsalabs.com/mailman/listinfo/firewall-wizards



Relevant Pages

  • Re: Opinions on application design?
    ... http is text based application protocol ... It goes through sockets.(he probaby meant web server) ... raw sockets provide raw network protocol access ... > of simultaneous connections to a single server. ...
    (comp.lang.java.programmer)
  • possibly ZoneAlarm
    ... HTTP connections error out with no error code ... I believe the underlying issue is that the winsock registries become corrupt. ... Run "netsh winsock reset catalog" from a command prompt and then reboot. ...
    (microsoft.public.windowsxp.network_web)
  • Re: Surely not?
    ... >>> I have the laptop connected to the net via my home network and ... I only had 2 Connections ... <quote from the HTTP Log> ... HTTP GET Request) the "favicon.ico" File, ...
    (uk.people.silversurfers)
  • Re: [fw-wiz] can iptables block incoming http connections from open proxy servers?
    ... How can I block people from making http connections to an internal ... While I think that open http proxies are an excellent tool for surfing ... by the input chain to stop inbound connections from proxy servers ...
    (Firewall-Wizards)
  • Re: HTTP not working, but everything else seems okay??
    ... I am having the same issue at a remote site ... In fact everything works except for http. ... The "Net.Tcp Port Sharing Service". ... HTTP connections. ...
    (microsoft.public.windowsxp.network_web)