Linux Netfilter discussions
 help / color / mirror / Atom feed
* Direct Internet Connection For Client
@ 2007-11-13  7:29 Tarak Ranjan
  2007-11-13  8:04 ` Покотиленко Костик
  2007-11-13  8:13 ` Rob Sterenborg
  0 siblings, 2 replies; 4+ messages in thread
From: Tarak Ranjan @ 2007-11-13  7:29 UTC (permalink / raw)
  To: netfilter

Hi list,
           i have installed proxy and gateway in the same system. How 
can  stop "Direct Connection" in web browser for internet for the 
clients(proxy). i have redirect 80 port to 8080. then also direct 
connection is happening from the clients. what sort of iptables rules 
i've to implement in my gateway firewall , that every time users should 
pass through proxy(8080). No Direct Connection........



-- 
Thanks & Regards,
______________
Tarak Ranjan
E: tarak.ranjan@liqwidkrystal.com
IM: reachtarak@hotmail.com

Online Learning|Certification|Learning Solutions :
www.liqwidkrystal.com



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Direct Internet Connection For Client
  2007-11-13  7:29 Direct Internet Connection For Client Tarak Ranjan
@ 2007-11-13  8:04 ` Покотиленко Костик
  2007-11-13  8:13 ` Rob Sterenborg
  1 sibling, 0 replies; 4+ messages in thread
From: Покотиленко Костик @ 2007-11-13  8:04 UTC (permalink / raw)
  To: Tarak Ranjan; +Cc: netfilter

В Вто, 13/11/2007 в 12:59 +0530, Tarak Ranjan пишет:
> Hi list,
>            i have installed proxy and gateway in the same system. How 
> can  stop "Direct Connection" in web browser for internet for the 
> clients(proxy). i have redirect 80 port to 8080. then also direct 
> connection is happening from the clients. what sort of iptables rules 
> i've to implement in my gateway firewall , that every time users should 
> pass through proxy(8080). No Direct Connection........

iptables -A FORWARD -i <client_iface> -o <inet_iface> -j REJECT
--reject-with icmp-admin-prohibited

-- 
Покотиленко Костик <casper@meteor.dp.ua>



^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Direct Internet Connection For Client
  2007-11-13  7:29 Direct Internet Connection For Client Tarak Ranjan
  2007-11-13  8:04 ` Покотиленко Костик
@ 2007-11-13  8:13 ` Rob Sterenborg
  2007-11-13 11:46   ` Tarak Ranjan
  1 sibling, 1 reply; 4+ messages in thread
From: Rob Sterenborg @ 2007-11-13  8:13 UTC (permalink / raw)
  To: 'Tarak Ranjan', netfilter

> Hi list,
>            i have installed proxy and gateway in the same system.
> How
> can  stop "Direct Connection" in web browser for internet for the
> clients(proxy). i have redirect 80 port to 8080. then also direct
> connection is happening from the clients. what sort of iptables
> rules
> i've to implement in my gateway firewall , that every time users
> should
> pass through proxy(8080). No Direct Connection........

When your clients can still connect when you redirect port 80 to 8080
then your redirection doesn't work.
This may be because packets hit another rule before the redirection. Or
maybe you are redirecting to localhost which, (last time I tried) is not
possible.

If I'm correct you've posted this question before and when I looked
through that script I didn't have much trust in it. If you really want
good advice, post your ruleset (and perhaps routing table). Otherwise,
simply blocking internet access is done like this:

$ipt -A FORWARD -s <net_lan> -p tcp --dport 80 \
  -j REJECT --reject-with tcp-reset

The actual place where you want to insert the rule depends on the script
you're currently using. This will do nothing if packets are already
accepted by a previous rule.


Grts,
Rob



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Direct Internet Connection For Client
  2007-11-13  8:13 ` Rob Sterenborg
@ 2007-11-13 11:46   ` Tarak Ranjan
  0 siblings, 0 replies; 4+ messages in thread
From: Tarak Ranjan @ 2007-11-13 11:46 UTC (permalink / raw)
  To: netfilter; +Cc: Rob Sterenborg

[-- Attachment #1: Type: text/plain, Size: 624 bytes --]



Rob Sterenborg wrote:
>> 
> If I'm correct you've posted this question before and when I looked
> through that script I didn't have much trust in it. If you really want
> good advice, post your ruleset (and perhaps routing table). Otherwise,
> simply blocking internet access is done like this:
> 
> $ipt -A FORWARD -s <net_lan> -p tcp --dport 80 \
>   -j REJECT --reject-with tcp-reset
> 
> The actual place where you want to insert the rule depends on the script
> you're currently using. This will do nothing if packets are already
> accepted by a previous rule.
> 


Here is my iptables rules........ as an attachment

[-- Attachment #2: custom_rules.sh --]
[-- Type: application/x-shellscript, Size: 9850 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-11-13 11:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-13  7:29 Direct Internet Connection For Client Tarak Ranjan
2007-11-13  8:04 ` Покотиленко Костик
2007-11-13  8:13 ` Rob Sterenborg
2007-11-13 11:46   ` Tarak Ranjan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox