Date: Mon, 04 Jun 2001 17:31:50 +0700 From: "tinnakorn kunasit" <tinnakorn2000@hotmail.com> To: freebsd-questions@FreeBSD.ORG Subject: ipfirewall Message-ID: <F99eKljq65Rn8P5o7P60000d21f@hotmail.com>
next in thread | raw e-mail | index | archive | help
<html><DIV> </DIV> <DIV>dear sir</DIV> <DIV> I am install FreeBSD 4.2 but can not set firewall.</DIV> <DIV> </DIV> <DIV> In my system have 2 network card</DIV> <DIV> </DIV> <DIV> rl0 203.151.42.62</DIV> <DIV> rl1 10.0.0.1</DIV> <DIV> </DIV> <DIV> I want to make ip masquerade forward ip from inside (rl1) to outside (rl0)</DIV> <DIV> How I can make it?</DIV> <DIV> </DIV> <DIV> I tried to set</DIV> <DIV> </DIV> <DIV>1. add options for ipfirewall and recompile kernel</DIV> <DIV> </DIV> <DIV> options IPFIREWALL</DIV> <DIV> options IPDIVERT</DIV> <DIV> options IPFIREWALL_VERBOSE</DIV> <DIV> options IPFIREWALL_VERBOSE_LIMIT=100</DIV> <DIV> options IPFIREWALL_DEFAULT_TO_ACCEPT</DIV> <DIV> </DIV> <DIV> 2. in /etc/service</DIV> <DIV> natd 6668/divert</DIV> <DIV> </DIV> <DIV>3. enable firewall line in /etc/rc.conf</DIV> <DIV> firewall_enable="YES"</DIV> <DIV> firewall_script="/etc/rc.firewall"</DIV> <DIV> </DIV> <DIV>4. edit file /etc/rc.firewall</DIV> <DIV> /sbin/ipfw -f flush</DIV> <DIV> /sbin/ipfw -q add 100 pass all from any to any via lo0</DIV> <DIV> /sbin/ipfw -q add 200 pass all from any to 127.0.0.0/8 </DIV> <DIV> /sbin/ipfw -q add 300 pass all from any to any</DIV> <DIV> </DIV> <DIV> /sbin/sysctl -n -w net.inet.ip.forwarding=1</DIV> <DIV> /sbin/natd -l -d auth -m -u -n rl1 -dynamic</DIV> <DIV> /sbin/ipfw add divert natd all from any to any out</DIV> <DIV> <DIV> /sbin/ipfw add divert natd all from any to any in</DIV></DIV> <DIV> </DIV> <DIV>but I can not ping from inside to outside</DIV> <DIV> </DIV> <DIV> </DIV> <DIV>from command /sbin/ipchains -A forward -s 10.0.0.0/8 -d 0.0.0.0/0 -j MASQ</DIV> <DIV>How I change to ipfw?</DIV> <DIV> </DIV> <DIV> </DIV> <DIV> thank you</DIV> <DIV> </DIV> <DIV> Tinnakorn</DIV> <DIV> FreeBSD use</DIV> <DIV> </DIV> <DIV> </DIV> <DIV> </DIV> <DIV> </DIV><br clear=all><hr>Get Your Private, Free E-mail from MSN Hotmail at <a href="http://www.hotmail.com">http://www.hotmail.com</a>.<br></p></html> 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?F99eKljq65Rn8P5o7P60000d21f>