<%# Opennet Firmware Copyright 2010 Rene Ejury Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -%> <% local uci = require "luci.model.uci" local cursor = uci.cursor() %> <%+header%> <% function show_portmap(src_zone) %>
<% local t = {} cursor:foreach("firewall", "redirect", function(s) if src_zone == s.src then t[#t +1] = s end end) for index = 1, #t do local s = t[index] %> <% end %>
<%:on_portmapping_source_port%> <%:on_portmapping_target_address%> <%:on_portmapping_target_port%>
<%=s.src_dport%>
<%=s.dest_ip%>
<%=s.dest_port%>
" title="Del" name="<%=src_zone%>_del_section" />
<% end %>

<%:on_portmapping_title%>

<%:on_portmapping_internet%>

<%:on_portmapping_internet_comment%>
<% show_portmap("on_vpn") %>

<%:on_portmapping_opennet%>

<%:on_portmapping_opennet_comment%>
<% show_portmap("opennet") %>

<%:on_portmapping_dhcp%>

<%:on_portmapping_dhcp_comment%>
<% show_portmap("local") %>

<%:on_portmapping_wan%>

<%:on_portmapping_wan_comment%>
<% show_portmap("wan") %>
<%+footer%>