iptables - if you can find the time, I am stuck
Hi everyone,
Sorry to say, but I am simply too swamped to even read through this.
CC [email protected] since he is not on the list.
Have a nice day,
Oskar Andreasson
http://iptables-tutorial.haringstad.com
http://people.unix-fu.org/andreasson/
mailto: [email protected]
----- Original Message -----
From: <[email protected]>
To: <[email protected]>
Sent: Wednesday, June 12, 2002 5:55 PM
Subject: iptables - if you can find the time, I am stuck
Oskar,
I appreciated your iptables tutorial, but I am probably too dense to glean the right amount of knowledge from it.
My setup:
router external ip 213.237.89.99
internal address (gateway) 192.168.1.1
My machine (RH Advanced Server) 192.168.1.2, netmask 255.255.255.0
I wish to allow ports 80, 8888, 8080, ssh, dcc
from outside, but almost anything coming IN from 192.168.1.2-10
Likewise, I wish to allow almost anything going OUT to the Internet.
I have but one ethernet card, eth0 and am running ADSL through a Cisco 677 router.
My previous firewall, SuSE 8.0) worked like a charm, but I decided to try Red Hat Linux Advanced Server, which uses ipchains as a default. I dropped that and now want to use iptables, but the following iptables script prevents me from accessing the Internet from my machine!
I'd appreciate any assistance you can provide, even rejection if you do not have the time or inclination. I am busy myself ;-)
I attach my script, which deviates very little from your example.
Best Regards,
Malte Christensen
Med venlig hilsen
Best Regards,
Mit freundlichen/herzlichen Gruesse
N. Malte Christensen
fre, 2002-06-14 kl. 10:58 skrev Oskar Andreasson:
Quoted 4 lines
Sorry to say, but I am simply too swamped to even read through this. CC [email protected] since he is not on the list.
Quoted 1 line
I appreciated your iptables tutorial.
Using Oskar's rc.firewall and rulesets as a guide:
From the Internet: INPUT -> tcp_packets -> allowed
Your rules are:
#
# TCP rules
#
$IPTABLES -A tcp_packets -p TCP -s 0/0 -j LOG --log-prefix "IPT tcp_packets :"
$IPTABLES -A tcp_packets -p TCP -s 0/0 --dport 22 -j allowed $IPTABLES -A tcp_packets -p TCP -s 0/0 --dport 25 -j allowed $IPTABLES -A tcp_packets -p TCP -s 0/0 --dport 80 -j allowed $IPTABLES -A tcp_packets -p TCP -s 0/0 --dport 113 -j allowed $IPTABLES -A tcp_packets -p TCP -s 0/0 --dport 1810 -j allowed
But you say:
"I wish to allow ports 80, 8888, 8080, ssh, dcc from outside",
So, allow them then. You've already loaded ip_conntrack, so more shouldn't be necessary.
Further, you say:
"(I wish to allow) almost anything coming IN from 192.168.1.2-10"
You don't allow -m state --state NEW packets out from your LAN (you allow established etc. packets back in, but you don't allow new connections out).
Oskar writes:
$IPTABLES -A INPUT -p ALL -i $LAN_IFACE -s $LAN_IP_RANGE -j ACCEPT
I.e., accept new connections out.
This is just to be getting on with.
Best,
Tony
Signature · 11 lines
Tony Earnshaw e-post: [email protected] www: http://www.billy.demon.nl gpg public key: http://www.billy.demon.nl/tonni.armor Telefoon: (+31) (0)172 530428 Mobiel: (+31) (0)6 51153356 GPG Fingerprint = 3924 6BF8 A755 DE1A 4AD6 FA2B F7D7 6051 3BE7 B981 3BE7B981