From: Alex Flex <aflexzor@gmail.com>
To: netfilter@vger.kernel.org
Subject: Help with stateless firewall
Date: Mon, 12 Aug 2013 13:28:59 -0600 [thread overview]
Message-ID: <5209377B.5030105@gmail.com> (raw)
Hello NetFilter,
Iam working with a stateless firewall to help keep up with DoS and a
state flood. I have a few doubts about my setup:
a.) When allowing web traffic, is it neecessary to allow port range
1000:65535 ? i saw that due to this rule sending packets to those ports
directly respond with a REJECT instead of a DROP which is preffered. Any
work arround and still have a stateless setup?
b.) What is needed to safely have a default OUTPUT DROP, apparently as
soon as i change it to that iam unable to access it via ssh, even if I
add a rule like this: /sbin/iptables -A OUTPUT -p tcp --dport 22 -j ACCEPT
Thanks for your help.
Alex
#!/bin/bash
/sbin/iptables -F
/sbin/iptables -X
/sbin/iptables -P INPUT DROP
/sbin/iptables -P FORWARD DROP
/sbin/iptables -P OUTPUT ACCEPT
#ICMP IN
/sbin/iptables -A INPUT -p icmp -s 178.174.50.29/24 -j ACCEPT
#ICMP IN (TRACEROUTE)
/sbin/iptables -A INPUT -p icmp --icmp-type 0 -j ACCEPT
/sbin/iptables -A INPUT -p icmp --icmp-type 11 -j ACCEPT
#ICMP OUT
/sbin/iptables -A OUTPUT -p icmp --icmp-type 8 -j ACCEPT
#DNS RESOLVERS
/sbin/iptables -A INPUT -s 63.15.64.91 -j ACCEPT
/sbin/iptables -A INPUT -s 63.15.64.92 -j ACCEPT
#SSH
/sbin/iptables -A INPUT -p tcp --dport 22 -j ACCEPT
#WEB
/sbin/iptables -A INPUT -p tcp --dport 1000:65535 -j ACCEPT
/sbin/iptables -A INPUT -p tcp --dport 80 -j ACCEPT
next reply other threads:[~2013-08-12 19:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-12 19:28 Alex Flex [this message]
2013-08-12 21:41 ` Help with stateless firewall /dev/rob0
2013-08-12 22:19 ` Alex Flex
2013-08-13 6:56 ` André Paulsberg
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=5209377B.5030105@gmail.com \
--to=aflexzor@gmail.com \
--cc=netfilter@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