# You should not edit this file.  Instead, create a file with the same
# name as this one, but with a .rul extension instead of .def.  The
# .rul file will override this one.
#
# However, any changes you make to this file will be preserved.

#: Masquerade packets from internal networks
#if [ -n "$INTERNAL" -a -n "$EXTERNAL_IN" -a -n "$PFW" ]; then
if [ -n "$EXTERNAL_IN" -a -n "$PFW" ]; then
    for pool in $PFWPOOLS; do
	eval "PROTOS=\"\$PFWPROTO_$pool\""
	eval "ORIGPORTS=\"\$PFWORIGPORTS_$pool\""
	eval "PFWIP=\"\$PFWIP_$pool\""
	eval "PFWPORT=\"\$PFWPORT_$pool\""
	for PROTO in $PROTOS; do
	    for ORIGPORT in $ORIGPORTS; do
		ORIGPORT_DASH=$(echo $ORIGPORT | sed 's/:/-/g')
		for j in $EXTERNAL_IN; do
		    ipnm_cache $j
		    EXTIP=$IPOFIF
		    case $MASQMETHOD in
		    ipfwadm)
			ipmasqadm portfw -a -P $PROTO -L $EXTIP $ORIGPORT_DASH -R $PFWIP $PFWPORT
			;;
		    ipchains)
			ipmasqadm portfw -a -P $PROTO -L $EXTIP $ORIGPORT_DASH -R $PFWIP $PFWPORT
			;;
		    netfilter)
			$IPTABLES -A PREROUTING -t nat -p $PROTO -d $EXTIP --dport $ORIGPORT -j DNAT --to $PFWIP${PFWPORT:+:$PFWPORT}
			;;
		    esac
		    for i in $INTERNAL; do
		    	ipnm_cache $i
			case $MASQMETHOD in
			netfilter)
			    $IPTABLES -A FORWARD -i $j -o $i -p $PROTO --dport $ORIGPORT -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
# TODO: This should be done only for the interface containing the portforward host
#			    if [ "$PORTFW_REMAP_LOCAL" = "y" ]; then
#				$IPTABLES -A POSTROUTING -t nat -p $PROTO -d $PFWIP ${PFWPORT:+--dport $PFWPORT} -s $IPOFIF/$NMOFIF -j SNAT --to $IPOFIF
#			    fi
			    ;;
        		esac
    		    done
		done
	    done
	done
    done
fi
=master'>commit</a><a class='active' href='/notmuch/diff/tags/57/13/kapateco.201611150833.3.68.6564304.288a3@kp.kpmail.be/old?h=master'>diff</a></td><td class='form'><form class='right' method='get' action='/notmuch/log/tags/57/13/kapateco.201611150833.3.68.6564304.288a3@kp.kpmail.be/old'>
<input type='hidden' name='h' value='master'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/notmuch/diff/?h=master'>root</a>/<a href='/notmuch/diff/tags?h=master'>tags</a>/<a href='/notmuch/diff/tags/57?h=master'>57</a>/<a href='/notmuch/diff/tags/57/13?h=master'>13</a>/<a href='/notmuch/diff/tags/57/13/kapateco.201611150833.3.68.6564304.288a3@kp.kpmail.be?h=master'>kapateco.201611150833.3.68.6564304.288a3@kp.kpmail.be</a>/<a href='/notmuch/diff/tags/57/13/kapateco.201611150833.3.68.6564304.288a3@kp.kpmail.be/old?h=master'>old</a></div><div class='content'><div class='cgit-panel'><b>diff options</b><form method='get'><input type='hidden' name='h' value='master'/><table><tr><td colspan='2'/></tr><tr><td class='label'>context:</td><td class='ctrl'><select name='context' onchange='this.form.submit();'><option value='1'>1</option><option value='2'>2</option><option value='3' selected='selected'>3</option><option value='4'>4</option><option value='5'>5</option><option value='6'>6</option><option value='7'>7</option><option value='8'>8</option><option value='9'>9</option><option value='10'>10</option><option value='15'>15</option><option value='20'>20</option><option value='25'>25</option><option value='30'>30</option><option value='35'>35</option><option value='40'>40</option></select></td></tr><tr><td class='label'>space:</td><td class='ctrl'><select name='ignorews' onchange='this.form.submit();'><option value='0' selected='selected'>include</option><option value='1'>ignore</option></select></td></tr><tr><td class='label'>mode:</td><td class='ctrl'><select name='dt' onchange='this.form.submit();'><option value='0' selected='selected'>unified</option><option value='1'>ssdiff</option><option value='2'>stat only</option></select></td></tr><tr><td/><td class='ctrl'><noscript><input type='submit' value='reload'/></noscript></td></tr></table></form></div><div class='diffstat-header'><a href='/notmuch/diff/?h=master'>Diffstat</a> (limited to 'tags/57/13/kapateco.201611150833.3.68.6564304.288a3@kp.kpmail.be/old')</div><table summary='diffstat' class='diffstat'><tr><td class='mode'>-rw-r--r--</td><td class='add'><a href='/notmuch/diff/tags/57/13/kapateco.201611150833.3.68.6564304.288a3@kp.kpmail.be/old?h=master'>tags/57/13/kapateco.201611150833.3.68.6564304.288a3@kp.kpmail.be/old</a></td><td class='right'>0</td><td class='graph'><table summary='file diffstat' width='0%'><tr><td class='add' style='width: -nan%;'/><td class='rem' style='width: -nan%;'/><td class='none' style='width: -nan%;'/></tr></table></td></tr>
</table><div class='diffstat-summary'>1 files changed, 0 insertions, 0 deletions</div><table summary='diff' class='diff'><tr><td>