From: Patrik Hildingsson ph@kurd.nu
To: lartc@vger.kernel.org
Subject: [LARTC] Another newbyish question I'm afraid, -m state --state matters
Date: Wed, 28 Feb 2001 18:37:06 +0000 [thread overview]
Message-ID: <marc-lartc-98373940417068@msgid-missing> (raw)
In-Reply-To: <marc-lartc-98373940417067@msgid-missing>
<PRE>Please post this on the netfilter mailinglist instead of here as this is an
iproute2-mailinglist, not dedicated to iproute2.
See more info at <A HREF="http://netfilter.samba.org">http://netfilter.samba.org</A>
use iptables -A INPUT -i eth0 -p tcp -m state --state NEW --dport ! 22 -j
DROP
/Patrik
-----Original Message-----
From: <A HREF="mailto:lartc-admin@mailman.ds9a.nl">lartc-admin@mailman.ds9a.nl</A> [mailto:<A HREF="mailto:lartc-admin@mailman.ds9a.nl">lartc-admin@mailman.ds9a.nl</A>]On
Behalf Of Paul Wouters
Sent: den 28 februari 2001 18:07
To: <A HREF="mailto:lartc@mailman.ds9a.nl">lartc@mailman.ds9a.nl</A>
Subject: [LARTC] Another newbyish question I'm afraid, -m state --state
matters
I'd like to be able to deny all new connections to a firewall, with the
exception of port 22 (sshd) and some ports I'd like to forward internally.
Now, there is this nice feature Rusty describes to do that:
iptables -A INPUT -i eth0 -m state --state NEW,INVALID -j DROP
iptables -A FORWARD -i eth0 -m state --state NEW,INVALID -j DROP
However, it seems I can't make a rule that is using the state AND a
source/dest
port in there. Eg the following won't work:
iptables -A INPUT -i eth0 -m state --state NEW,INVALID --dport 22 -j DROP
iptables -A INPUT -i eth0 -m state --state NEW,INVALID -j DROP
iptables -A FORWARD -i eth0 -m state --state NEW,INVALID --dport 25 -j
ACCEPT
iptables -A FORWARD -i eth0 -m state --state NEW,INVALID -j DROP
Anyone? :)
Paul
--
Just patent your virus and sue the anti-virus companies for reverse
enineering it.
--- <A HREF="mailto:cne_pc@youknowwhattodo.yahoo.com">cne_pc@youknowwhattodo.yahoo.com</A>, in response to
Norton's
patent on "software updates"
_______________________________________________
LARTC mailing list / <A HREF="mailto:LARTC@mailman.ds9a.nl">LARTC@mailman.ds9a.nl</A>
<A HREF="http://mailman.ds9a.nl/mailman/listinfo/lartc">http://mailman.ds9a.nl/mailman/listinfo/lartc</A> HOWTO:
<A HREF="http://ds9a.nl/2.4Routing/">http://ds9a.nl/2.4Routing/</A>
</PRE>
next prev parent reply other threads:[~2001-02-28 18:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-02-28 17:06 [LARTC] Another newbyish question I'm afraid, -m state --state matters Paul
2001-02-28 18:37 ` Patrik [this message]
2001-03-01 9:21 ` [LARTC] Another newbyish question I'm afraid, -m state --state Arthur
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=marc-lartc-98373940417068@msgid-missing \
--to=lartc@vger.kernel.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