From: "Jörg Harmuth" <harmuth@mnemon.de>
To: netfilter@lists.netfilter.org
Subject: Re: Host blocking
Date: Tue, 17 May 2005 13:12:03 +0200 [thread overview]
Message-ID: <4289D183.5010809@mnemon.de> (raw)
In-Reply-To: <003b01c55acb$841114a0$f00aa9c0@winxp>
Wennie V. Lagmay schrieb:
> Our ISP's Proxy server is proxy.ISP.net , our company's own proxy server
> is proxy.ourcompany.net. Our own proxy server has delay_pool but our ISP
> proxy server dont have. I want to control our client to use only our
> company proxy server. how can I block the proxy.ISP.net using IP tables
> so that every body can be force to use our compnay proxy server. (note
> that our company proxy server is connected to our ISP proxy server as
> cache_peer parent)
iptables -P FORWARD DROP
# From now on your clients can't connect to your ISPs proxy.
# Is a good idea for INPUT and may be OUTPUT too, imho.
#
# If you set IN|OUTPUT policy to DROP you need to allow
# connections to proxy.ourcompany.net explicitly and
# you need to allow lo traffic. E.g.:
iptables -A INPUT -i lo -j ACCEPT
# Allow traffic, that is already initialized.
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
# You need to allow access to each service you offer like
# proxy, smtp, pop3,... e.g.
iptables -A INPUT -p tcp -s <netaddress/netmask> \
-d <your_internal_proxy_ip> --dport <proxy_port> \
--syn -j ACCEPT
[more services to allow]
# Only if OUTPUT policy is DROP or REJECT
iptables -A OUTPUT -o lo -j ACCEPT
iptables -A OUTPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
# Access to your ISPs proxy:
iptables -A OUTPUT -p tcp -d <ip_of_isp_proxy> \
--dport <proxy_port> --syn -j ACCEPT
[more stuff to allow]
# If you need ICP, allow it too. You should also allow
# at least ICMP "Destination unreachable"
There are many ways to Rome - this is the basic approach. Note, that
here are probaly some side effects. E.g. if your clients contact the
ISPs DNS, you have to allow that too, or set up an own DNS and allow
client access to your DNS and access from your DNS to ISP DNS.
For more details see "man iptables" and the excellent tutorial at
http://iptables-tutorial.frozentux.net/chunkyhtml/index.html
which is - imho - a Must_To_Read :)
HTH and have a nice time,
Joerg
next prev parent reply other threads:[~2005-05-17 11:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-17 10:30 Host blocking Wennie V. Lagmay
2005-05-17 11:12 ` Jörg Harmuth [this message]
2005-05-17 13:09 ` Askar
2005-05-17 13:17 ` wlagmay
2005-05-17 13:14 ` Jason Opperisano
2005-05-17 13:39 ` Wennie V. Lagmay
2005-05-17 13:44 ` Jason Opperisano
2005-05-17 13:50 ` Wennie V. Lagmay
2005-05-18 7:09 ` Wennie V. Lagmay
2005-05-18 15:08 ` Jason Opperisano
2005-05-19 4:10 ` Wennie V. Lagmay
2005-05-19 18:38 ` Jason Opperisano
2005-05-17 16:06 ` Taylor, Grant
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4289D183.5010809@mnemon.de \
--to=harmuth@mnemon.de \
--cc=netfilter@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox