Date: Wed, 26 Sep 2001 09:35:01 -0500 From: David Kelly <dkelly@hiwaay.net> To: Bradley Oedithipus <bradley@lightstep.org> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: natd/ipfw/sshd problem. Message-ID: <20010926093501.B20900@grumpy.dyndns.org> In-Reply-To: <Pine.BSF.4.32.0109260240520.2896-100000@lightstep.org>; from bradley@lightstep.org on Wed, Sep 26, 2001 at 02:41:19AM -0500 References: <Pine.BSF.4.21.0109252104110.47372-100000@cody.jharris.com> <Pine.BSF.4.32.0109260240520.2896-100000@lightstep.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Sep 26, 2001 at 02:41:19AM -0500, Bradley Oedithipus wrote: > > Yes, everything works, whatever the ipfw rules are.. > EXCEPT ssh... > weird huh? As I suggested earlier, try the old BASIC debugging technique of sprinking print statements in your code. Or in this case, "log". You have a lot more traffic on lo0 than I usually see. I put my divert rule further down the list after having dropped some really nasty stuff which should never be on the interfaces. Much of this was lifted from http://www.mostgraveconcern.com/freebsd/ ${fwcmd} add 100 pass all from any to any via lo0 ${fwcmd} add 200 deny all from any to 127.0.0.0/8 ${fwcmd} add 300 deny ip from 127.0.0.0/8 to any # Stop spoofing ${fwcmd} add deny all from ${inet}:${imask} to any in via ${oif} ${fwcmd} add deny all from ${onet}:${omask} to any in via ${iif} # Stop RFC1918 nets on the outside interface ${fwcmd} add deny all from any to 10.0.0.0/8 via ${oif} ${fwcmd} add deny all from any to 172.16.0.0/12 via ${oif} ${fwcmd} add deny log all from any to 192.168.0.0/16 via ${oif} # Stop draft-manning-dsua-03.txt (1 May 2000) nets (includes RESERVED-1, # DHCP auto-configuration, NET-TEST, MULTICAST (class D), and class E) # on the outside interface ${fwcmd} add deny all from any to 0.0.0.0/8 via ${oif} ${fwcmd} add deny all from any to 169.254.0.0/16 via ${oif} ${fwcmd} add deny all from any to 192.0.2.0/24 via ${oif} ${fwcmd} add deny all from any to 224.0.0.0/4 via ${oif} ${fwcmd} add deny all from any to 240.0.0.0/4 via ${oif} # Network Address Translation. This rule is placed here deliberately # so that it does not interfere with the surrounding address-checking # rules. If for example one of your internal LAN machines had its IP # address set to 192.0.2.1 then an incoming packet for it after being # translated by natd(8) would match the `deny' rule above. Similarly # an outgoing packet originated from it before being translated would # match the `deny' rule below. ${fwcmd} add divert natd all from any to any via ${natd_interface} [...] -- David Kelly N4HHE, dkelly@hiwaay.net ===================================================================== The human mind ordinarily operates at only ten percent of its capacity -- the rest is overhead for the operating system. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010926093501.B20900>