Skip to contentSkip to conversation

Rules for Blocking Proxies...

DISCUSSION Harry 5 participants 12 messages Apr 20, 2004 – Apr 28, 2004

lore
Share & tools
lore

Harry

author
#0 lore raw

Hi All,
I am running Fedora and Redhat 9 on two servers at my Cybercafe, connected on two Hi speed Lines, I have a decent firewall script, but these days I am facing issues about people changing the Proxy settings in order to get thru porn sites, can anybody suggest some rules which I can implement in the script that avoids connection to these servers? Suggestions are welcome.

Regards

Harry

"In all this world, there is only you
When all else ceases, there is only you"
-- to my MASTER!
Harish
[email protected]
[email protected]

#1 lore raw
Quoted 8 lines · Harry

Hi All,
I am running Fedora and Redhat 9 on two servers at my Cybercafe, connected on two Hi speed Lines, I have a decent firewall script, but these days I am facing issues about people changing the Proxy settings in order to get thru porn sites, can anybody suggest some rules which I can implement in the script that avoids connection to these servers? Suggestions are welcome. Regards
Harry

Transparent proxy and firewall port blocking would be usefull to reject your users changing the proxy.

- Rio.Martin -

#2 lore raw
In reply to Harry
Quoted 6 lines · Harry

Hi All,
I am running Fedora and Redhat 9 on two servers at my Cybercafe, connected on two Hi speed Lines, I have a decent firewall script, but these days I am facing issues about people changing the Proxy settings in order to get thru porn sites, can anybody suggest some rules which I can implement in the script that avoids connection to these servers? Suggestions are welcome.

The firewall should allow connections to remote web servers (ie TCP --dport 80, 8080 etc) from the proxy server's IP only.

Don't allow any other IP address in your network to connect to an external address on dport 80.

Regards,

Antony.

Signature · 8 lines
"The problem with television is that the people must sit and keep their eyes 
glued on a screen; the average American family hasn't time for it."

 - Report in the New York Times, following a demonstration at the 1939 World's 
Fair.

                                                     Please reply to the list;
                                                           please don't CC me.
#3 lore raw
In reply to Harry

set up your own proxy server and only permit connections to this box :)

----- Original Message -----
From: Harry
To: [email protected]
Sent: Tuesday, April 20, 2004 1:44 PM
Subject: Rules for Blocking Proxies...

Hi All,
I am running Fedora and Redhat 9 on two servers at my Cybercafe, connected on two Hi speed Lines, I have a decent firewall script, but these days I am facing issues about people changing the Proxy settings in order to get thru porn sites, can anybody suggest some rules which I can implement in the script that avoids connection to these servers? Suggestions are welcome.

Regards

Harry

"In all this world, there is only you
When all else ceases, there is only you"
-- to my MASTER!
Harish
[email protected]
[email protected]

#4 lore raw
Quoted 10 lines · Alexis

set up your own proxy server and only permit connections to this box :)

----- Original Message -----
From: Harry
To: [email protected]
Sent: Tuesday, April 20, 2004 1:44 PM
Subject: Rules for Blocking Proxies...

Quoted 8 lines

Hi All,
I am running Fedora and Redhat 9 on two servers at my Cybercafe, connected on two Hi speed Lines, I have a decent firewall script, but these days I am facing issues about people changing the Proxy settings in order to get thru porn sites, can anybody suggest some rules which I can implement in the script that avoids connection to these servers? Suggestions are welcome.

<snip>
Or use a ban list to DROP packets destined for the public proxies ...

Signature · 7 lines
--
Raymond Leach <[email protected]>
Network Support Specialist
http://www.knowledgefactory.co.za
"lynx -source http://www.rchq.co.za/raymondl.asc | gpg --import"
Key fingerprint = 7209 A695 9EE0 E971 A9AD  00EE 8757 EE47 F06F FB28
--
#5 lore raw
In reply to Alexis
Quoted 1 line · Alexis

set up your own proxy server and only permit connections to this box :)

I must admit I had assumed, when answering this previously, that Harry was already running his own proxy, but wanted to stop clients reconfiguring their browsers to go direct instead.

If the proxy server is instead on the outside of the network, then the answer to the question "how do I stop people changing the browser settings to bypass the proxy?" is to allow connections on TCP port 80 to the proxy server only, and block all other destination addresses for that port.

Remember of course that you can always do a DNAT rule to send people to the proxy address anyway, even if they did decide to go direct - then instead of getting a "connection timeout" message they find themselves using the proxy even after reconfiguring their browser settings :)

iptables -A PREROUTING -t nat -p tcp --dport 80 -j DNAT --to IP.of.pro.xy

Regards,

Antony.

Quoted 11 lines

Hi All,
I am running Fedora and Redhat 9 on two servers at my Cybercafe,
connected on two Hi speed Lines, I have a decent firewall script, but these days I am facing issues about people changing the Proxy settings in order to get thru porn sites, can anybody suggest some rules which I can implement in the script that avoids connection to these servers? Suggestions are welcome.

Regards

Harry

Signature · 5 lines
The difference between theory and practice is that in theory there is no 
difference, whereas in practice there is.

                                                     Please reply to the list;
                                                           please don't CC me.
#6 lore raw

beside this.
You could remove privileges from the clients, even with an active directory implementation (ajjjj) or i think i saw cybercafe software that block any settings change on the client box.

----- Original Message -----
From: "Antony Stone" <[email protected]>
To: "Netfilter" <[email protected]>
Sent: Tuesday, April 20, 2004 10:53 AM
Subject: Re: Rules for Blocking Proxies...

Quoted 6 lines · Alexis
Quoted 2 lines

set up your own proxy server and only permit connections to this box :)

I must admit I had assumed, when answering this previously, that Harry was already running his own proxy, but wanted to stop clients reconfiguring

their

Quoted 3 lines

browsers to go direct instead.

If the proxy server is instead on the outside of the network, then the

answer

Quoted 1 line

to the question "how do I stop people changing the browser settings to

bypass

Quoted 1 line

the proxy?" is to allow connections on TCP port 80 to the proxy server

only,

Quoted 3 lines

and block all other destination addresses for that port.

Remember of course that you can always do a DNAT rule to send people to

the

Quoted 1 line

proxy address anyway, even if they did decide to go direct - then instead

of

Quoted 1 line

getting a "connection timeout" message they find themselves using the

proxy

Quoted 11 lines

even after reconfiguring their browser settings :)

iptables -A PREROUTING -t nat -p tcp --dport 80 -j DNAT --to IP.of.pro.xy

Regards,

Antony.

Quoted 3 lines

Hi All,
I am running Fedora and Redhat 9 on two servers at my Cybercafe,
connected on two Hi speed Lines, I have a decent firewall script, but

these

Quoted 1 line
Quoted 1 line

days I am facing issues about people changing the Proxy settings in

order

Quoted 4 lines
Quoted 4 lines

to get thru porn sites, can anybody suggest some rules which I can implement in the script that avoids connection to these servers? Suggestions are welcome.

Quoted 9 lines
Quoted 3 lines

Regards

Harry

Signature · 4 lines
The difference between theory and practice is that in theory there is no
difference, whereas in practice there is.

                                                     Please reply to the

list;

Quoted 1 line

please don't CC

me.

Quoted 3 lines
#7 lore raw
In reply to Antony Stone

beside this.
You could remove privileges from the clients, even with an active directory implementation (ajjjj) or i think i saw cybercafe software that block any settings change on the client box.

----- Original Message -----
From: "Antony Stone" <[email protected]>
To: "Netfilter" <[email protected]>
Sent: Tuesday, April 20, 2004 10:53 AM
Subject: Re: Rules for Blocking Proxies...

Quoted 6 lines · Alexis
Quoted 2 lines

set up your own proxy server and only permit connections to this box :)

I must admit I had assumed, when answering this previously, that Harry was already running his own proxy, but wanted to stop clients reconfiguring

their

Quoted 3 lines

browsers to go direct instead.

If the proxy server is instead on the outside of the network, then the

answer

Quoted 1 line

to the question "how do I stop people changing the browser settings to

bypass

Quoted 1 line

the proxy?" is to allow connections on TCP port 80 to the proxy server

only,

Quoted 3 lines

and block all other destination addresses for that port.

Remember of course that you can always do a DNAT rule to send people to

the

Quoted 1 line

proxy address anyway, even if they did decide to go direct - then instead

of

Quoted 1 line

getting a "connection timeout" message they find themselves using the

proxy

Quoted 11 lines

even after reconfiguring their browser settings :)

iptables -A PREROUTING -t nat -p tcp --dport 80 -j DNAT --to IP.of.pro.xy

Regards,

Antony.

Quoted 3 lines

Hi All,
I am running Fedora and Redhat 9 on two servers at my Cybercafe,
connected on two Hi speed Lines, I have a decent firewall script, but

these

Quoted 1 line
Quoted 1 line

days I am facing issues about people changing the Proxy settings in

order

Quoted 4 lines
Quoted 4 lines

to get thru porn sites, can anybody suggest some rules which I can implement in the script that avoids connection to these servers? Suggestions are welcome.

Quoted 9 lines
Quoted 3 lines

Regards

Harry

Signature · 4 lines
The difference between theory and practice is that in theory there is no
difference, whereas in practice there is.

                                                     Please reply to the

list;

Quoted 1 line

please don't CC

me.

Quoted 3 lines
#8 lore raw
Quoted 4 lines · Alexis

beside this.
You could remove privileges from the clients, even with an active directory implementation (ajjjj) or i think i saw cybercafe software that block any settings change on the client box.

That is making some very big assumptions about what Operating System/s are running on the clients....

Regards,

Antony.

Signature · 6 lines
The truth is rarely pure, and never simple.

 - Oscar Wilde

                                                     Please reply to the list;
                                                           please don't CC me.
author
#9 lore raw

Hey All,

These are loads of recommendations, well I am using Windows 2000 Clients, what i think should be best for my level of understanding is a simple set of rules that can be added to my firewall script that will STOP all other connections except the INTIF connection on which squid and Iptables listens. I have attached my script, Pls suggest any modifications....

Regards
Harry

"In all this world, there is only you
When all else ceases, there is only you" -- to my MASTER!
Harish
[email protected] [email protected]
----- Original Message -----
From: "Antony Stone" <[email protected]>
To: "Netfilter" <[email protected]>
Sent: Tuesday, April 20, 2004 7:37 AM
Subject: Re: Rules for Blocking Proxies...

Quoted 4 lines · Alexis
Quoted 3 lines

beside this.
You could remove privileges from the clients, even with an active

directory

Quoted 1 line
Quoted 1 line

implementation (ajjjj) or i think i saw cybercafe software that block

any

Quoted 7 lines
Quoted 1 line

settings change on the client box.

That is making some very big assumptions about what Operating System/s are running on the clients....

Regards,

Quoted 8 lines

Antony.

--
The truth is rarely pure, and never simple.

- Oscar Wilde

Please reply to the

list;

Quoted 1 line

please don't CC

me.

Quoted 2 lines
author
#10 lore raw

Re: Rules for Blocking Proxies...THANKS !!

In reply to Antony Stone

Hi All,
Many thanks Mr.Antony, Alexix and the rest who helped me with the rule, the DNAT rule works great!! Was just going thru a website
http://www.antiproxy.com
wow...they have loads of ports thru which proxies can be bypassed?So does that mean I have to write rules for each of the relavent ports?at the moment I have just done for port 3128, and blocked the site antiproxy.com thru squid.
Suggestions are welcome...

Regards
Harry

"In all this world, there is only you
When all else ceases, there is only you" -- to my MASTER!
Harish
[email protected] [email protected]
----- Original Message -----
From: "Antony Stone" <[email protected]>
To: "Netfilter" <[email protected]>
Sent: Tuesday, April 20, 2004 7:37 AM
Subject: Re: Rules for Blocking Proxies...

Quoted 4 lines · Alexis
Quoted 3 lines

beside this.
You could remove privileges from the clients, even with an active

directory

Quoted 1 line
Quoted 1 line

implementation (ajjjj) or i think i saw cybercafe software that block

any

Quoted 7 lines
Quoted 1 line

settings change on the client box.

That is making some very big assumptions about what Operating System/s are running on the clients....

Regards,

Quoted 8 lines

Antony.

--
The truth is rarely pure, and never simple.

- Oscar Wilde

Please reply to the

list;

Quoted 1 line

please don't CC

me.

Quoted 2 lines
#11 lore raw

Re: Rules for Blocking Proxies...THANKS !!

Quoted 11 lines · Harry

Hi All,
Many thanks Mr.Antony, Alexix and the rest who helped me with the rule, the DNAT rule works great!! Was just going thru a website
http://www.antiproxy.com
wow...they have loads of ports thru which proxies can be bypassed?So does that mean I have to write rules for each of the relavent ports?at the moment I have just done for port 3128, and blocked the site antiproxy.com thru squid.
Suggestions are welcome...
Regards
Harry

Maybe you should change Policy for FORWARD chain into Default DENY. After that, you can add your allowed connection port list to be allowed. Like port 80,25,53,110,8080,etc..

- Rio.Martin -