From: "Robert Jenkins" <raj@jrw.co.uk>
To: 'Mike Jagdis' <jaggy@purplet.demon.co.uk>
Cc: linux-diald@vger.kernel.org
Subject: RE: diald slow to be useful...
Date: Thu, 30 May 2002 14:51:43 +0100 [thread overview]
Message-ID: <000001c207e1$228d8050$e239832c@jrws2> (raw)
In-Reply-To: <3CF61115.90700@purplet.demon.co.uk>
Hi Mike,
This is basically what I'm using for the firewall (I've changed my Ip
addresses & trimmed out some port forwards & other junk).
It's based on a template I found on the internet, but I can't remember
where...
Using iptables makes it a fraction of the size of my old ipchains
firewall!
Regards,
Robert Jenkins.
mailto:raj@jrw.co.uk
#!/bin/bash
#
#Point this to your copy of ip_tables
IPT="/sbin/iptables"
#Load the modules. (Moved to rc.local)
#modprobe ip_tables
#echo 1 > /proc/sys/net/ipv4/ip_forward
#Flush old rules, delete the firewall chain if it exists
$IPT -F
$IPT -F -t nat
$IPT -X firewall
#Setup Masquerading. Change the IP to your internal network and
uncomment
#this in order to enable it.
$IPT -A POSTROUTING -t nat -s 192.168.0.0/24 -j MASQUERADE
$IPT -P FORWARD ACCEPT
#Set up the firewall chain
$IPT -N firewall
$IPT -A firewall -j LOG --log-level info --log-prefix "Firewall:"
$IPT -A firewall -j DROP
#Accept ourselves
$IPT -A INPUT -s 127.0.0.1/32 -d 127.0.0.1/32 -j ACCEPT
#If you're using IP Masquerading, change this IP to whatever your
internl
#IP addres is and uncomment it
$IPT -A INPUT -s 192.168.0.0/24 -d 0/0 -j ACCEPT
#Accept DNS
$IPT -A INPUT -p udp --source-port 53 -j ACCEPT
#And NTP
$IPT -A INPUT -p udp --source-port 123 --destination-port 123 -j ACCEPT
$IPT -A INPUT -p tcp --source-port 123 --destination-port 123 -j ACCEPT
#Allow ftp to send data back and forth.
$IPT -A INPUT -p tcp ! --syn --source-port 20 --destination-port
1024:65535 -j ACCEPT
#Accept SSH.
#$IPT -A INPUT -p tcp --destination-port 22 -j ACCEPT
#Send everything else to the firewall.
$IPT -A INPUT -p icmp -j firewall
$IPT -A INPUT -p tcp --syn -j firewall
$IPT -A INPUT -p udp -j firewall
#
# End.
#
prev parent reply other threads:[~2002-05-30 13:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-10 3:09 diald slow to be useful Matt Garman
2002-05-10 16:53 ` Mike Jagdis
[not found] ` <"from jaggy"@purplet.demon.co.uk>
2002-05-17 23:50 ` Matt Garman
2002-05-29 9:09 ` Mike Jagdis
2002-05-29 11:18 ` Matt Garman
2002-05-30 11:41 ` Mike Jagdis
2002-05-30 18:24 ` Jonathan Goldblatt
2002-06-27 11:27 ` Bjorn Hammarberg
2002-05-30 8:37 ` Robert Jenkins
2002-05-30 11:46 ` Mike Jagdis
2002-05-30 13:51 ` Robert Jenkins [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='000001c207e1$228d8050$e239832c@jrws2' \
--to=raj@jrw.co.uk \
--cc=jaggy@purplet.demon.co.uk \
--cc=linux-diald@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