Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Kim Jensen <kimj@dawn.dk>
To: kenn murrah <kenn@thebytebusiness.com>, netfilter@lists.netfilter.org
Subject: Re: newbie question about port blocking
Date: Thu, 17 Apr 2003 16:37:12 +0200	[thread overview]
Message-ID: <200304171637.12672.kimj@dawn.dk> (raw)
In-Reply-To: <200304171622.51239.kimj@dawn.dk>

Whoopsie,

Rules should be:
$ iptables -t filter -A INPUT -i lo -j ACCEPT
$ iptables -t filter -A INPUT -p tcp --dport 80 -j ACCEPT
$ iptables -t filter -A INPUT -j DROP
$ iptables -t filter -A FORWARD -p tcp --dport 80 -j ACCEPT
$ iptables -t filter -A FORWARD -j DROP

This allows nothing but web, however you may wish to open up other things as 
well, such as a few ICMP services, and as I mentioned - if you are using a 
transparent proxy, you have to add some additional rules to allow the proxy 
to work..

/Kim

On Thursday 17 April 2003 15:49, kenn murrah wrote:
> Sorry for the elementary nature of this question ... I've just installed
> linux and have a transparent proxy working using iptables ... but my goal
> is to block ALL non-http traffic in both directions ... that is, i want to
> allow web access but no instant messenging, no ftp, etc.
>
> is there a simple line or two that i can add to iptables?  please feel free
> to tell me to RTFM, but the tutorial i just downloaded is 151 pages, and i
> admit that i'm looking for a fast solution this morning ... (i'll study the
> manual on the way home tonight on the train -- i promise!)
>
> can anyone help me out?  all advice MOST appreciated.



      parent reply	other threads:[~2003-04-17 14:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-17 13:49 newbie question about port blocking kenn murrah
2003-04-17 14:22 ` Kim Jensen
2003-04-17 14:33   ` kenn murrah
2003-04-17 15:05     ` Cedric Blancher
2003-04-17 20:06       ` kenn murrah
2003-04-17 14:37   ` Kim Jensen [this message]

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=200304171637.12672.kimj@dawn.dk \
    --to=kimj@dawn.dk \
    --cc=kenn@thebytebusiness.com \
    --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