diff options
author | Hajimu UMEMOTO <ume@FreeBSD.org> | 2009-12-29 11:27:51 +0000 |
---|---|---|
committer | Hajimu UMEMOTO <ume@FreeBSD.org> | 2009-12-29 11:27:51 +0000 |
commit | 30e7dc3c5625798069ceccba745388ef2c34ee02 (patch) | |
tree | 6f85d8efe1f82bc615995014ce4f50720474c982 /etc | |
parent | a7cb923912cfc221300ddc2ceccf48616a192dc2 (diff) | |
download | src-30e7dc3c5625798069ceccba745388ef2c34ee02.tar.gz src-30e7dc3c5625798069ceccba745388ef2c34ee02.zip |
Add missing me6 rules. Now, the IPv6 rules become equivalent
to the IPv4 rules.
Reported by: David Horn <dhorn2000__at__gmail.com>
Notes
Notes:
svn path=/head/; revision=201193
Diffstat (limited to 'etc')
-rw-r--r-- | etc/rc.firewall | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/etc/rc.firewall b/etc/rc.firewall index 1eddde2fa008..639f559c538f 100644 --- a/etc/rc.firewall +++ b/etc/rc.firewall @@ -230,18 +230,30 @@ case ${firewall_type} in # Allow setup of incoming email ${fwcmd} add pass tcp from any to me 25 setup + if [ -n "$net6" ]; then + ${fwcmd} add pass tcp from any to me6 25 setup + fi # Allow setup of outgoing TCP connections only ${fwcmd} add pass tcp from me to any setup + if [ -n "$net6" ]; then + ${fwcmd} add pass tcp from me6 to any setup + fi # Disallow setup of all other TCP connections ${fwcmd} add deny tcp from any to any setup # Allow DNS queries out in the world ${fwcmd} add pass udp from me to any 53 keep-state + if [ -n "$net6" ]; then + ${fwcmd} add pass udp from me6 to any 53 keep-state + fi # Allow NTP queries out in the world ${fwcmd} add pass udp from me to any 123 keep-state + if [ -n "$net6" ]; then + ${fwcmd} add pass udp from me6 to any 123 keep-state + fi # Everything else is denied by default, unless the # IPFIREWALL_DEFAULT_TO_ACCEPT option is set in your kernel @@ -388,14 +400,25 @@ case ${firewall_type} in # Allow setup of incoming email ${fwcmd} add pass tcp from any to me 25 setup + if [ -n "$inet6" ]; then + ${fwcmd} add pass tcp from any to me6 25 setup + fi # Allow access to our DNS ${fwcmd} add pass tcp from any to me 53 setup ${fwcmd} add pass udp from any to me 53 ${fwcmd} add pass udp from me 53 to any + if [ -n "$inet6" ]; then + ${fwcmd} add pass tcp from any to me6 53 setup + ${fwcmd} add pass udp from any to me6 53 + ${fwcmd} add pass udp from me6 53 to any + fi # Allow access to our WWW ${fwcmd} add pass tcp from any to me 80 setup + if [ -n "$inet6" ]; then + ${fwcmd} add pass tcp from any to me6 80 setup + fi # Reject&Log all setup of incoming connections from the outside ${fwcmd} add deny log ip4 from any to any in via ${oif} setup proto tcp @@ -409,9 +432,15 @@ case ${firewall_type} in # Allow DNS queries out in the world ${fwcmd} add pass udp from me to any 53 keep-state + if [ -n "$inet6" ]; then + ${fwcmd} add pass udp from me6 to any 53 keep-state + fi # Allow NTP queries out in the world ${fwcmd} add pass udp from me to any 123 keep-state + if [ -n "$inet6" ]; then + ${fwcmd} add pass udp from me6 to any 123 keep-state + fi # Everything else is denied by default, unless the # IPFIREWALL_DEFAULT_TO_ACCEPT option is set in your kernel |