View | Details | Raw Unified | Return to bug 194292 | Differences between
and this patch

Collapse All | Expand All

(-)etc/rc.firewall (-2 / +19 lines)
Lines 422-428 Link Here
422
422
423
[Ww][Oo][Rr][Kk][Ss][Tt][Aa][Tt][Ii][Oo][Nn])
423
[Ww][Oo][Rr][Kk][Ss][Tt][Aa][Tt][Ii][Oo][Nn])
424
	# Configuration:
424
	# Configuration:
425
	#  firewall_myservices:		List of TCP ports on which this host
425
	#  firewall_myservices:		List of ports on which this host
426
	#			 	 offers services.
426
	#			 	 offers services.
427
	#  firewall_allowservices:	List of IPv4 and/or IPv6 addresses
427
	#  firewall_allowservices:	List of IPv4 and/or IPv6 addresses
428
	#				 that have access to
428
	#				 that have access to
Lines 487-493 Link Here
487
	#
487
	#
488
	for i in ${firewall_allowservices} ; do
488
	for i in ${firewall_allowservices} ; do
489
	  for j in ${firewall_myservices} ; do
489
	  for j in ${firewall_myservices} ; do
490
	    ${fwcmd} add pass tcp from $i to me $j
490
	    case $j in
491
	    [0-9A-Za-z]*/[Pp][Rr][Oo][Tt][Oo])
492
	      ${fwcmd} add pass ${j%/[Pp][Rr][Oo][Tt][Oo]} from $i to me
493
	    ;;
494
	    [0-9A-Za-z]*/[Tt][Cc][Pp])
495
	      ${fwcmd} add pass tcp from $i to me ${j%/[Tt][Cc][Pp]}
496
	    ;;
497
	    [0-9A-Za-z]*/[Uu][Dd][Pp])
498
	      ${fwcmd} add pass udp from $i to me ${j%/[Uu][Dd][Pp]}
499
	    ;;
500
	    *[0-9A-Za-z])
501
	      echo "Consider using tcp/$j in firewall_myservices." > /dev/stderr
502
	      ${fwcmd} add pass udp from $i to me $j
503
	    ;;
504
	    *)
505
	      echo "Invalid port in firewall_myservices: $j" > /dev/stderr
506
	    ;;
507
	    esac
491
	  done
508
	  done
492
	done
509
	done
493
510

Return to bug 194292