From: Jason Opperisano <opie@817west.com>
To: netfilter@lists.netfilter.org
Subject: Re: blocking all trafic exapt selcter ports
Date: Sat, 23 Apr 2005 10:54:44 -0400 [thread overview]
Message-ID: <20050423145444.GA8083@bender.817west.com> (raw)
In-Reply-To: <426A13FB.2030507@crazeecanuck.homelinux.net>
On Sat, Apr 23, 2005 at 05:23:07AM -0400, Ed wrote:
> Kashif Ali Bukhari wrote:
> > i want to block all inbod access to my linux box and want to allow
> > dns, http proxy,ssh,telnet,and ftp
> > how can i do this
>
> First, please see
> http://www.catb.org/~esr/faqs/smart-questions.html
i love that link.
> iptables -A INPUT -p tcp --dport 21 -j ACCEPT
> iptables -A INPUT -p tcp --dport 22 -j ACCEPT
> iptables -A INPUT -p tcp --dport 23 -j ACCEPT
> iptables -A INPUT -p tcp --dport 53 -j ACCEPT
and:
iptables -A INPUT -p udp --dport 53 -j ACCEPT
> iptables -A INPUT -p tcp --dport 3128 -j ACCEPT
> iptables -P INPUT DROP
>
> or if you compile your kernel/iptables with multiport support
>
> iptables -A INPUT -m multiport -p tcp --dports 21-23,53,3128 -j ACCEPT
multiport doesn't support ranges, mport does (and it uses a ':' not a
'-'):
iptables -A INPUT -p tcp -m mport --dports 21:23,53,3128 -j ACCEPT
iptables -A INPUT -p udp --dport 53 -j ACCEPT
> iptables -P INPUT DROP
>
> A classic RTFM/STFW case, nonetheless...
yes. couldn't resist the nit-pick, though. ;-)
-j
--
"Joe Swanson: You can't just come over here and annex my pool!
Peter: Oh yeah? Well, according to paragraph 7, sentence 3, word 8 of
the Geneva Convention..."the". So, tough luck, Swanson."
--Family Guy
next prev parent reply other threads:[~2005-04-23 14:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-23 8:47 blocking all trafic exapt selcter ports Kashif Ali Bukhari
2005-04-23 9:20 ` Edward Shornock
2005-04-23 9:23 ` Ed
2005-04-23 14:54 ` Jason Opperisano [this message]
2005-04-23 20:58 ` Ed
2005-04-23 22:36 ` blocking all traffic except selected ports Ed
2005-04-23 22:50 ` Jason Opperisano
2005-04-23 22:54 ` Taylor Grant
2005-04-23 23:07 ` R. DuFresne
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=20050423145444.GA8083@bender.817west.com \
--to=opie@817west.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.