Post by Conny R. LandstedtTo Kim Nielsen & Gentoo-dev
In the "Gentoo Linux Security Guide"
Code listing 64: /etc/init.d/firewall
#Incoming traffic
einfo "Creating incoming ssh traffic chain"
$IPTABLES -N allow-ssh-traffic-in
$IPTABLES -F allow-ssh-traffic-in
$IPTABLES -A allow-ssh-traffic-in -p tcp --sport ssh -j ACCEPT
I'm not absolutely certain, but shouldn't it be "--dport" instead of
"--sport"?
Reg. Conny
_______________________________________________
gentoo-dev mailing list
http://lists.gentoo.org/mailman/listinfo/gentoo-dev
I believe that the line is for ssh-traffic in.. wich means.. that you
connect to a server in the internet to the ssh port..
and the rule makes it "allowable" for you to recieve the traffic that
comes from the server..
(otherwise you wouldn't be able to use the session because you would
drop everything that comes from the server to you)
But that's shouldn't be needed it one uses a statefull firewall like
iptables...
In my "home made" firewall.. I have this:
# Accept established connections and related ones
$IPT -A NET -m state --state ESTABLISHED,RELATED -j ACCEPT
where NET represents every INPUT from the internet (network device wich
goes to the net)
so..since I accept outgoing connections to ssh(it's also in the
firewall), whenever I iniciate a ssh connection to the outside it
becomes accepted.
I'm not shure that the "allow-ssh-traffic-in" is what i've just said,
it's a guess since I don't know/use that firewall, but if it is, I
believe that something like accepting the outgoing connection & using
that " --state ESTABLISHED,RELATED" would make the rule set cleaner
and easyer to manage...
«just my two euro cents»
And by the way, anyone was able to get dcc send and receive working with
masquerading with iptables?
Miguel Sousa Filipe
Gentoo user since November 2001 ;-)
p.s.: if anyone want's to see my rule set it's in:
URL: http://mega.ist.utl.pt/~mmsf/configs/rc.icewall