From: "Willem-Jan Meijer" <meyer3@chello.nl>
To: Netfilter <netfilter@lists.netfilter.org>
Subject: Firewall troubles
Date: Thu, 5 Jun 2003 15:43:12 +0200 [thread overview]
Message-ID: <000001c32b68$6bc631d0$0500a8c0@m28721.findquick.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 965 bytes --]
Hello all,
I'm running debian 3.0r1 stable with all security and usual updates. I was
running a
firewall wich is send with this e-mail as attachment.
It was running fine, but recently my hdd died and recovery was to expensive
and not
necessary because I had a backup. I installed debian again, did all updates
and I wanted
to load the firewall, but when I load this one, my remote login hangs, I
can't ping
my server anymore and my network isn't working anymore, but the script has
runned fine
before. What is the problem? At this moment ipmasq is also installed to keep
my network
running, this is conflicting, I know but I don't know anything else.
Can someone point me in the right direction? I'm using linux/debian from
november 2002,
so my knowledge is very small.
HTH,
Willem-Jan Meijer
Netherlands
Windows: Where do you want to go today?
MacOS: Where do you want to be tomorrow?
Linux: Are you coming or what?
[-- Attachment #2: fw-meijer.txt --]
[-- Type: text/plain, Size: 2097 bytes --]
echo -n "IPTables Firewall."
IPTABLES="/sbin/iptables"
#FLUSH
echo -n "Flush all tables."
$IPTABLES --flush
echo -n "."
$IPTABLES --table nat --flush
echo -n "."
$IPTABLES --delete-chain
echo -n "."
$IPTABLES --table nat --delete-chain
echo ". done"
echo -n " Setting up masquerading rules."
# Set up IPFORWARDing and Masquerading
$IPTABLES --table nat --append POSTROUTING --out-interface eth1 -j MASQUERADE
echo -n "."
$IPTABLES --append FORWARD --in-interface eth1 -j ACCEPT
echo ". done"
echo -n "Setting rules for loopback device."
# Allow loopback access.
$IPTABLES -A INPUT -i lo -p all -j ACCEPT
echo -n "."
$IPTABLES -A OUTPUT -o lo -p all -j ACCEPT
echo -n "."
echo -n "Setting rules for eth0 device."
# accept established connections
$IPTABLES -A INPUT -i eht0 -m state --state ESTABLISHED,RELATED -j ACCEPT
echo -n "."
#$IPTABLES -A INPUT -p tcp --tcp-option ! 2 -j REJECT --reject-with tcp-reset
#echo -n "."
$IPTABLES -A INPUT -p tcp -i eth0 --dport 21 -j ACCEPT
echo -n "."
$IPTABLES -A INPUT -p udp -i eth0 --dport 21 -j ACCEPT
echo -n "."
$IPTABLES -A INPUT -p tcp -i eth0 --dport 22 -j ACCEPT
echo -n "."
$IPTABLES -A INPUT -p udp -i eth0 --dport 22 -j ACCEPT
echo -n "."
$IPTABLES -A INPUT -p tcp -i eth0 --dport 25 -j ACCEPT
echo -n "."
$IPTABLES -A INPUT -p udp -i eth0 --dport 25 -j ACCEPT
echo -n "."
$IPTABLES -A INPUT -p tcp -i eth0 --dport 80 -j ACCEPT
echo -n "."
$IPTABLES -A INPUT -p udp -i eth0 --dport 80 -j ACCEPT
echo -n "."
$IPTABLES -A INPUT -p tcp -i eth0 --dport 110 -j ACCEPT
echo -n "."
$IPTABLES -A INPUT -p udp -i eth0 --dport 110 -j ACCEPT
echo -n "."
$IPTABLES -A INPUT -p tcp -i eth0 --dport 65500:65535 -j ACCEPT
echo -n "."
$IPTABLES -A INPUT -p udp -i eth0 --dport 65500:65535 -j ACCEPT
echo -n "."
$IPTABLES -A INPUT -p icmp -i eth0 -j ACCEPT
echo ". done"
echo -n " Setting rules for eth1 device."
# Accept all incoming connections
$IPTABLES -A INPUT -i eth1 -p all -j ACCEPT
echo ". done"
echo -n " Drop all other connection attempts."
$IPTABLES -P INPUT DROP
echo ". done"
next reply other threads:[~2003-06-05 13:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-05 13:43 Willem-Jan Meijer [this message]
2003-06-05 19:46 ` Firewall troubles Pascal Italiaander
2003-06-06 8:08 ` Willem-Jan Meijer
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='000001c32b68$6bc631d0$0500a8c0@m28721.findquick.com' \
--to=meyer3@chello.nl \
--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.