Date: Wed, 5 Mar 2003 09:32:13 -0600 From: "Brian Henning" <b1henning@hotmail.com> To: "freebsd" <freebsd-questions@FreeBSD.ORG> Subject: firewall revisited Message-ID: <OE14i67EKRuYDlrjbud000010a0@hotmail.com>
next in thread | raw e-mail | index | archive | help
Hello- currently my rc.conf is set up like this for my gateway router. gateway_enable="YES" firewall_enable="YES" firewall_type="OPEN" natd_enable="YES" natd_interface="rl1" # natd -interface rl1, public interface natd_flags="" # sysctl net.inet.ip.forwarding=1 how can i have the script /etc/ipfw.rules run instead of /etc/rc.firewall. can i change firewall_type="OPEN" to firewall_type="" and create the entry firewall_script="/etc/ipfw.rules"? what i would like to do is block all access to services on the router like httpd, sshd, etc the other think i would like to do is port forward ssh from another machine and allow access of that from an external network. does something like this make sense? thanks, brian /etc/rc.firewall.rules ---------------------- #!/bin/sh IPFW=/sbin/ipfw ${IPFW} -f flush ${IPFW} add 00200 divert natd all from any to any via rl1 ${IPFW} add 00250 pass tcp from ${ROUTER_IP} to ${MACHINE1_IP} 22 ${IPFW} add 00260 pass tcp from ${MACHINE1_IP} 22 to ${ROUTER_IP} ${IPFW} add 00300 pass all from any to any 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?OE14i67EKRuYDlrjbud000010a0>