From owner-freebsd-hackers Mon Dec 24 4: 9: 0 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mars-gw.morning.ru (ns.morning.ru [195.161.98.5]) by hub.freebsd.org (Postfix) with ESMTP id CEEDB37B436; Mon, 24 Dec 2001 04:08:47 -0800 (PST) Received: from NDNM ([195.161.98.250]) by mars-gw.morning.ru (8.11.5/8.11.5) with ESMTP id fBOC8jC61894; Mon, 24 Dec 2001 19:08:46 +0700 (KRAT) Date: Mon, 24 Dec 2001 19:10:09 +0700 From: Igor M Podlesny X-Mailer: The Bat! (v1.53d) Business Organization: Morning Network X-Priority: 3 (Normal) Message-ID: <107466819110.20011224191009@morning.ru> To: freebsd-hackers@FreeBSD.ORG Subject: /etc/rc.firewall and /sys/netinet/ip_input.c are doing the same thing In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG well, not all the same, but partly. Take a look: /sys/netinet/ip_input.c ----------------------- /* 127/8 must not appear on wire - RFC1122 */ if ((ntohl(ip->ip_dst.s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET || (ntohl(ip->ip_src.s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET) { if ((m->m_pkthdr.rcvif->if_flags & IFF_LOOPBACK) == 0) { ipstat.ips_badaddr++; goto bad; } } and /etc/rc.firewall ---------------- ############ # Only in rare cases do you want to change these rules # ${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 -- Igor M Podlesny a.k.a. Poige http://www.morning.ru/~poige To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message