Project

General

Profile

Download (17.5 KB) Statistics
| Branch: | Tag: | Revision:
1 340e6dca Scott Ullrich
<?php
2 b46bfcf5 Bill Marquette
/* $Id$ */
3 5b237745 Scott Ullrich
/*
4
	firewall_nat.php
5 c55b323d Scott Ullrich
	Copyright (C) 2004 Scott Ullrich
6 6317d31d Phil Davis
	Copyright (C) 2013-2015 Electric Sheep Fencing, LP
7 c55b323d Scott Ullrich
	All rights reserved.
8 340e6dca Scott Ullrich
9 c55b323d Scott Ullrich
	originally part of m0n0wall (http://m0n0.ch/wall)
10 5b237745 Scott Ullrich
	Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
11
	All rights reserved.
12 340e6dca Scott Ullrich
13 5b237745 Scott Ullrich
	Redistribution and use in source and binary forms, with or without
14
	modification, are permitted provided that the following conditions are met:
15 340e6dca Scott Ullrich
16 5b237745 Scott Ullrich
	1. Redistributions of source code must retain the above copyright notice,
17
	   this list of conditions and the following disclaimer.
18 340e6dca Scott Ullrich
19 5b237745 Scott Ullrich
	2. Redistributions in binary form must reproduce the above copyright
20
	   notice, this list of conditions and the following disclaimer in the
21
	   documentation and/or other materials provided with the distribution.
22 340e6dca Scott Ullrich
23 5b237745 Scott Ullrich
	THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
24
	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
25
	AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26
	AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
27
	OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28
	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29
	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30
	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31
	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32
	POSSIBILITY OF SUCH DAMAGE.
33
*/
34 7ac5a4cb Scott Ullrich
/*
35
	pfSense_MODULE:	nat
36
*/
37 5b237745 Scott Ullrich
38 6b07c15a Matthew Grooms
##|+PRIV
39
##|*IDENT=page-firewall-nat-portforward
40
##|*NAME=Firewall: NAT: Port Forward page
41
##|*DESCR=Allow access to the 'Firewall: NAT: Port Forward' page.
42
##|*MATCH=firewall_nat.php*
43
##|-PRIV
44
45 5b237745 Scott Ullrich
require("guiconfig.inc");
46 7a927e67 Scott Ullrich
require_once("functions.inc");
47
require_once("filter.inc");
48
require_once("shaper.inc");
49 483e6de8 Scott Ullrich
require_once("itemid.inc");
50 5b237745 Scott Ullrich
51 e8c2c890 Bill Marquette
if (!is_array($config['nat']['rule']))
52 5b237745 Scott Ullrich
	$config['nat']['rule'] = array();
53 fbe94068 Scott Ullrich
54 5b237745 Scott Ullrich
$a_nat = &$config['nat']['rule'];
55
56 514dbaf8 Scott Ullrich
/* if a custom message has been passed along, lets process it */
57
if ($_GET['savemsg'])
58
	$savemsg = $_GET['savemsg'];
59
60 5b237745 Scott Ullrich
if ($_POST) {
61
62
	$pconfig = $_POST;
63
64
	if ($_POST['apply']) {
65 e8c2c890 Bill Marquette
66 5b237745 Scott Ullrich
		$retval = 0;
67 7a6c350f Scott Ullrich
68 e2c9ef13 Scott Ullrich
		$retval |= filter_configure();
69 05da8941 Erik Fonnesbeck
		$savemsg = get_std_save_message($retval);
70 7d04082e Scott Ullrich
71 1a700ea6 Scott Ullrich
		pfSense_handle_custom_code("/usr/local/pkg/firewall_nat/apply");
72
73 5b237745 Scott Ullrich
		if ($retval == 0) {
74 a368a026 Ermal Lu?i
			clear_subsystem_dirty('natconf');
75
			clear_subsystem_dirty('filter');
76 5b237745 Scott Ullrich
		}
77 7d04082e Scott Ullrich
78 5b237745 Scott Ullrich
	}
79
}
80
81 759d0de1 Renato Botelho
if ($_GET['act'] == "del") {
82
	if ($a_nat[$_GET['id']]) {
83 3a343d73 jim-p
84 759d0de1 Renato Botelho
		if (isset($a_nat[$_GET['id']]['associated-rule-id'])) {
85
			delete_id($a_nat[$_GET['id']]['associated-rule-id'], $config['filter']['rule']);
86 3a343d73 jim-p
			$want_dirty_filter = true;
87 759d0de1 Renato Botelho
		}
88
		unset($a_nat[$_GET['id']]);
89 3a343d73 jim-p
90
		if (write_config()) {
91
			mark_subsystem_dirty('natconf');
92
			if ($want_dirty_filter)
93
				mark_subsystem_dirty('filter');
94
		}
95 759d0de1 Renato Botelho
		header("Location: firewall_nat.php");
96
		exit;
97
	}
98
}
99
100 00bcbdd0 Bill Marquette
if (isset($_POST['del_x'])) {
101 4b9a670c Scott Ullrich
    /* delete selected rules */
102
    if (is_array($_POST['rule']) && count($_POST['rule'])) {
103
	    foreach ($_POST['rule'] as $rulei) {
104 049a688e Ermal Lu?i
		$target = $rule['target'];
105 b9e28d57 unknown
			// Check for filter rule associations
106 9b16b834 Ermal Lu?i
			if (isset($a_nat[$rulei]['associated-rule-id'])){
107
				delete_id($a_nat[$rulei]['associated-rule-id'], $config['filter']['rule']);
108 b9e28d57 unknown
				
109
				mark_subsystem_dirty('filter');
110
			}
111 4b9a670c Scott Ullrich
	        unset($a_nat[$rulei]);
112
	    }
113 3a343d73 jim-p
		if (write_config())
114
			mark_subsystem_dirty('natconf');
115
		header("Location: firewall_nat.php");
116
		exit;
117 4b9a670c Scott Ullrich
	}
118 00bcbdd0 Bill Marquette
119
} else {
120
        /* yuck - IE won't send value attributes for image buttons, while Mozilla does - so we use .x/.y to find move button clicks instead... */
121
        unset($movebtn);
122
        foreach ($_POST as $pn => $pd) {
123
                if (preg_match("/move_(\d+)_x/", $pn, $matches)) {
124
                        $movebtn = $matches[1];
125
                        break;
126
                }
127
        }
128
        /* move selected rules before this rule */
129
        if (isset($movebtn) && is_array($_POST['rule']) && count($_POST['rule'])) {
130
                $a_nat_new = array();
131
132
                /* copy all rules < $movebtn and not selected */
133
                for ($i = 0; $i < $movebtn; $i++) {
134
                        if (!in_array($i, $_POST['rule']))
135
                                $a_nat_new[] = $a_nat[$i];
136
                }
137
138
                /* copy all selected rules */
139
                for ($i = 0; $i < count($a_nat); $i++) {
140
                        if ($i == $movebtn)
141
                                continue;
142
                        if (in_array($i, $_POST['rule']))
143
                                $a_nat_new[] = $a_nat[$i];
144
                }
145
146
                /* copy $movebtn rule */
147
                if ($movebtn < count($a_nat))
148
                        $a_nat_new[] = $a_nat[$movebtn];
149
150
                /* copy all rules > $movebtn and not selected */
151
                for ($i = $movebtn+1; $i < count($a_nat); $i++) {
152
                        if (!in_array($i, $_POST['rule']))
153
                                $a_nat_new[] = $a_nat[$i];
154
                }
155
                $a_nat = $a_nat_new;
156 3a343d73 jim-p
		if (write_config())
157
			mark_subsystem_dirty('natconf');
158 00bcbdd0 Bill Marquette
                header("Location: firewall_nat.php");
159
                exit;
160
        }
161 5b237745 Scott Ullrich
}
162 00bcbdd0 Bill Marquette
163 d16a49ae Colin Fleming
$closehead = false;
164 7fcd0934 Renato Botelho
$pgtitle = array(gettext("Firewall"),gettext("NAT"),gettext("Port Forward"));
165 6eb17647 Scott Ullrich
include("head.inc");
166
167 91f026b0 ayvis
echo "<script type=\"text/javascript\" src=\"/javascript/domTT/domLib.js\"></script>";
168
echo "<script type=\"text/javascript\" src=\"/javascript/domTT/domTT.js\"></script>";
169
echo "<script type=\"text/javascript\" src=\"/javascript/domTT/behaviour.js\"></script>";
170
echo "<script type=\"text/javascript\" src=\"/javascript/domTT/fadomatic.js\"></script>";
171 2a9db752 Scott Dale
172 24f600b0 Scott Ullrich
?>
173 d16a49ae Colin Fleming
</head>
174
175 6db7ee23 xbipin
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
176 5b237745 Scott Ullrich
<?php include("fbegin.inc"); ?>
177 00bcbdd0 Bill Marquette
<form action="firewall_nat.php" method="post" name="iform">
178 07130afe ayvis
<script type="text/javascript" src="/javascript/row_toggle.js"></script>
179 05da8941 Erik Fonnesbeck
<?php if ($savemsg) print_info_box($savemsg); ?>
180 d16a49ae Colin Fleming
<?php if (is_subsystem_dirty('natconf')): ?>
181 8cd558b6 ayvis
<?php print_info_box_np(gettext("The NAT configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));?><br />
182 5b237745 Scott Ullrich
<?php endif; ?>
183 d16a49ae Colin Fleming
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="firewall nat">
184 5b237745 Scott Ullrich
  <tr><td>
185 a8726a3d Scott Ullrich
<?php
186
	$tab_array = array();
187 5463dd9f me
	$tab_array[] = array(gettext("Port Forward"), true, "firewall_nat.php");
188 7fcd0934 Renato Botelho
	$tab_array[] = array(gettext("1:1"), false, "firewall_nat_1to1.php");
189 5463dd9f me
	$tab_array[] = array(gettext("Outbound"), false, "firewall_nat_out.php");
190 292ef22a Seth Mos
	$tab_array[] = array(gettext("NPt"), false, "firewall_nat_npt.php");
191 a8726a3d Scott Ullrich
	display_top_tabs($tab_array);
192
?>
193
 </td></tr>
194 340e6dca Scott Ullrich
  <tr>
195 d732f186 Bill Marquette
    <td>
196
	<div id="mainarea">
197 d16a49ae Colin Fleming
              <table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0" summary="main area">
198 00bcbdd0 Bill Marquette
                <tr id="frheader">
199
		  <td width="3%" class="list">&nbsp;</td>
200
                  <td width="3%" class="list">&nbsp;</td>
201 7fcd0934 Renato Botelho
		  <td width="5%" class="listhdrr"><?=gettext("If");?></td>
202
		  <td width="5%" class="listhdrr"><?=gettext("Proto");?></td>
203 d16a49ae Colin Fleming
		  <td width="11%" class="listhdrr nowrap"><?=gettext("Src. addr");?></td>
204
		  <td width="11%" class="listhdrr nowrap"><?=gettext("Src. ports");?></td>
205
		  <td width="11%" class="listhdrr nowrap"><?=gettext("Dest. addr");?></td>
206
		  <td width="11%" class="listhdrr nowrap"><?=gettext("Dest. ports");?></td>
207
		  <td width="11%" class="listhdrr nowrap"><?=gettext("NAT IP");?></td>
208
		  <td width="11%" class="listhdrr nowrap"><?=gettext("NAT Ports");?></td>
209 7fcd0934 Renato Botelho
		  <td width="11%" class="listhdr"><?=gettext("Description");?></td>
210 d415d821 Seth Mos
                  <td width="5%" class="list">
211 d16a49ae Colin Fleming
                    <table border="0" cellspacing="0" cellpadding="1" summary="list">
212 d415d821 Seth Mos
                      <tr>
213 759d0de1 Renato Botelho
			<td width="17">
214
			<?php if (count($a_nat) == 0): ?>
215 d16a49ae Colin Fleming
				<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" title="<?=gettext("delete selected rules");?>" border="0" alt="delete" />
216 759d0de1 Renato Botelho
			<?php else: ?>
217 d16a49ae Colin Fleming
				<input name="del" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" title="<?=gettext("delete selected rules"); ?>" onclick="return confirm('<?=gettext("Do you really want to delete the selected rules?");?>')" />
218 759d0de1 Renato Botelho
			<?php endif; ?>
219
			</td>
220 d16a49ae Colin Fleming
                        <td><a href="firewall_nat_edit.php?after=-1"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" alt="add" /></a></td>
221 d415d821 Seth Mos
                      </tr>
222
                    </table>
223
		  </td>
224 00bcbdd0 Bill Marquette
		</tr>
225
	<?php $nnats = $i = 0; foreach ($a_nat as $natent): ?>
226 40b56dc1 Scott Ullrich
	<?php 
227 2a9db752 Scott Dale
	
228
		//build Alias popup box
229
		$span_end = "</U></span>";
230 ec223192 Renato Botelho
231
		$alias_popup = rule_popup($natent['source']['address'], pprint_port($natent['source']['port']), $natent['destination']['address'], pprint_port($natent['destination']['port']));
232
233
		$alias_src_span_begin      = $alias_popup["src"];
234 2a9db752 Scott Dale
		$alias_src_port_span_begin = $alias_popup["srcport"];
235 ec223192 Renato Botelho
		$alias_dst_span_begin      = $alias_popup["dst"];
236 2a9db752 Scott Dale
		$alias_dst_port_span_begin = $alias_popup["dstport"];
237
238 00ad21b9 Darren Embry
		$alias_src_span_end        = $alias_popup["src_end"];
239
		$alias_src_port_span_end   = $alias_popup["srcport_end"];
240
		$alias_dst_span_end        = $alias_popup["dst_end"];
241
		$alias_dst_port_span_end   = $alias_popup["dstport_end"];
242
243 ec223192 Renato Botelho
		$alias_popup = rule_popup("","",$natent['target'], pprint_port($natent['local-port']));
244
245
		$alias_target_span_begin     = $alias_popup["dst"];
246
		$alias_local_port_span_begin = $alias_popup["dstport"];
247 6a459cef Renato Botelho
248 00ad21b9 Darren Embry
		$alias_target_span_end       = $alias_popup["dst_end"];
249
		$alias_local_port_span_end   = $alias_popup["dstport_end"];
250
251 96cde230 Renato Botelho
		if (isset($natent['disabled']))
252 6a459cef Renato Botelho
			$textss = "<span class=\"gray\">";
253 96cde230 Renato Botelho
		else
254
			$textss = "<span>";
255
256
		$textse = "</span>";
257 2a9db752 Scott Dale
	
258 40b56dc1 Scott Ullrich
		/* if user does not have access to edit an interface skip on to the next record */
259
		if(!have_natpfruleint_access($natent['interface'])) 
260
			continue;
261
	?>
262 00bcbdd0 Bill Marquette
                <tr valign="top" id="fr<?=$nnats;?>">
263 d16a49ae Colin Fleming
                  <td class="listt"><input type="checkbox" id="frc<?=$nnats;?>" name="rule[]" value="<?=$i;?>" onClick="fr_bgcolor('<?=$nnats;?>')" style="margin: 0; padding: 0; width: 15px; height: 15px;" /></td>
264 b9e28d57 unknown
                  <td class="listt" align="center">
265 9b16b834 Ermal Lu?i
					<?php if($natent['associated-rule-id'] == "pass"): ?>
266 d16a49ae Colin Fleming
					<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_pass.gif" title="<?=gettext("All traffic matching this NAT entry is passed"); ?>" border="0" alt="pass" />
267 3bb6bb18 Vinicius Coque
					<?php elseif (!empty($natent['associated-rule-id'])): ?>
268 d16a49ae Colin Fleming
					<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_chain.png" width="17" height="17" title="<?=gettext("Firewall rule ID"); ?> <?=htmlspecialchars($nnatid); ?> <?=gettext("is managed with this rule"); ?>" border="0" alt="change" />
269 537dff78 Chris Buechler
					<?php endif; ?>
270 b9e28d57 unknown
				  </td>
271 b8a0de00 Bill Marquette
                  <td class="listlr" onClick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_edit.php?id=<?=$nnats;?>';">
272 6a459cef Renato Botelho
                    <?=$textss;?>
273 8b1fab53 Scott Ullrich
		    <?php
274 8b35aa77 Erik Fonnesbeck
			if (!$natent['interface'])
275
				echo htmlspecialchars(convert_friendly_interface_to_friendly_descr("wan"));
276 00bcbdd0 Bill Marquette
			else
277 8b35aa77 Erik Fonnesbeck
				echo htmlspecialchars(convert_friendly_interface_to_friendly_descr($natent['interface']));
278 00bcbdd0 Bill Marquette
		    ?>
279 6a459cef Renato Botelho
                    <?=$textse;?>
280 5b237745 Scott Ullrich
                  </td>
281 ec223192 Renato Botelho
282 d16a49ae Colin Fleming
                  <td class="listr" onclick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_edit.php?id=<?=$nnats;?>';">
283 6a459cef Renato Botelho
					<?=$textss;?><?=strtoupper($natent['protocol']);?><?=$textse;?>
284 5b237745 Scott Ullrich
                  </td>
285 ec223192 Renato Botelho
286 d16a49ae Colin Fleming
                  <td class="listr" onclick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_edit.php?id=<?=$nnats;?>';">
287 ec223192 Renato Botelho
				    <?=$textss;?><?php echo $alias_src_span_begin;?><?php echo htmlspecialchars(pprint_address($natent['source']));?><?php echo $alias_src_span_end;?><?=$textse;?>
288
                  </td>
289 d16a49ae Colin Fleming
                  <td class="listr" onclick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_edit.php?id=<?=$nnats;?>';">
290 ec223192 Renato Botelho
				    <?=$textss;?><?php echo $alias_src_port_span_begin;?><?php echo htmlspecialchars(pprint_port($natent['source']['port']));?><?php echo $alias_src_port_span_end;?><?=$textse;?>
291
                  </td>
292
293 d16a49ae Colin Fleming
                  <td class="listr" onclick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_edit.php?id=<?=$nnats;?>';">
294 ec223192 Renato Botelho
				    <?=$textss;?><?php echo $alias_dst_span_begin;?><?php echo htmlspecialchars(pprint_address($natent['destination']));?><?php echo $alias_dst_span_end;?><?=$textse;?>
295 5b237745 Scott Ullrich
                  </td>
296 d16a49ae Colin Fleming
                  <td class="listr" onclick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_edit.php?id=<?=$nnats;?>';">
297 ec223192 Renato Botelho
				    <?=$textss;?><?php echo $alias_dst_port_span_begin;?><?php echo htmlspecialchars(pprint_port($natent['destination']['port']));?><?php echo $alias_dst_port_span_end;?><?=$textse;?>
298 5b237745 Scott Ullrich
                  </td>
299 ec223192 Renato Botelho
300 d16a49ae Colin Fleming
                  <td class="listr" onclick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_edit.php?id=<?=$nnats;?>';">
301 ec223192 Renato Botelho
				    <?=$textss;?><?php echo $alias_target_span_begin;?><?php echo htmlspecialchars($natent['target']);?><?php echo $alias_target_span_end;?><?=$textse;?>
302 5b237745 Scott Ullrich
                  </td>
303 d16a49ae Colin Fleming
                  <td class="listr" onclick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_edit.php?id=<?=$nnats;?>';">
304 47c5a08f Renato Botelho
					<?php
305 50dc3f41 Renato Botelho
						$localport = $natent['local-port'];
306
307 cfbfd941 smos
						list($dstbeginport, $dstendport) = explode("-", $natent['destination']['port']);
308 50dc3f41 Renato Botelho
309
						if ($dstendport) {
310
							$localendport = $natent['local-port'] + $dstendport - $dstbeginport;
311
							$localport   .= '-' . $localendport;
312
						}
313 47c5a08f Renato Botelho
					?>
314
				    <?=$textss;?><?php echo $alias_local_port_span_begin;?><?php echo htmlspecialchars(pprint_port($localport));?><?php echo $alias_local_port_span_end;?><?=$textse;?>
315 ec223192 Renato Botelho
                  </td>
316
317 d16a49ae Colin Fleming
                  <td class="listbg" onclick="fr_toggle(<?=$nnats;?>)" ondblclick="document.location='firewall_nat_edit.php?id=<?=$nnats;?>';">
318 6a459cef Renato Botelho
				  <?=$textss;?><?=htmlspecialchars($natent['descr']);?>&nbsp;<?=$textse;?>
319 5b237745 Scott Ullrich
                  </td>
320 d16a49ae Colin Fleming
                  <td valign="middle" class="list nowrap">
321
                    <table border="0" cellspacing="0" cellpadding="1" summary="move">
322 00bcbdd0 Bill Marquette
                      <tr>
323 d16a49ae Colin Fleming
			<td><input onmouseover="fr_insline(<?=$nnats;?>, true)" onmouseout="fr_insline(<?=$nnats;?>, false)" name="move_<?=$i;?>" src="/themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" title="<?=gettext("move selected rules before this rule");?>" height="17" type="image" width="17" border="0" /></td>
324 ebe08ebe Carlos Eduardo Ramos
                        <td><a href="firewall_nat_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="<?=gettext("edit rule"); ?>"></a></td>
325 00bcbdd0 Bill Marquette
                      </tr>
326
                      <tr>
327 d16a49ae Colin Fleming
					    <td align="center" valign="middle"><a href="firewall_nat.php?act=del&amp;id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this rule?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" title="<?=gettext("delete rule");?>" alt="delete" /></a></td>
328 324e112d Chris Buechler
			<td><a href="firewall_nat_edit.php?dup=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add a new NAT based on this one");?>" width="17" height="17" border="0" alt="add" /></a></td>
329 00bcbdd0 Bill Marquette
                      </tr>
330
                    </table>
331 801cbbf7 Phil Davis
			</td>
332 00bcbdd0 Bill Marquette
		</tr>
333
  	     <?php $i++; $nnats++; endforeach; ?>
334 340e6dca Scott Ullrich
                <tr>
335 00bcbdd0 Bill Marquette
                  <td class="list" colspan="8"></td>
336 ec223192 Renato Botelho
                  <td>&nbsp;</td>
337
                  <td>&nbsp;</td>
338
                  <td>&nbsp;</td>
339 d16a49ae Colin Fleming
                  <td class="list nowrap" valign="middle">
340
                    <table border="0" cellspacing="0" cellpadding="1" summary="move">
341 00bcbdd0 Bill Marquette
                      <tr>
342 d16a49ae Colin Fleming
			<td><?php if ($nnats == 0): ?><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="<?=gettext("move selected rules to end"); ?>" border="0" alt="move" /><?php else: ?><input name="move_<?=$i;?>" type="image" src="/themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" style="width:17;height:17;border:0" title="<?=gettext("move selected rules to end");?>" /><?php endif; ?></td>
343 00bcbdd0 Bill Marquette
                      </tr>
344
                      <tr>
345 759d0de1 Renato Botelho
			<td width="17">
346
			<?php if (count($a_nat) == 0): ?>
347 d16a49ae Colin Fleming
				<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" title="<?=gettext("delete selected rules");?>" border="0" alt="delete" />
348 759d0de1 Renato Botelho
			<?php else: ?>
349 d16a49ae Colin Fleming
				<input name="del" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" title="<?=gettext("delete selected rules"); ?>" onclick="return confirm('<?=gettext("Do you really want to delete the selected rules?");?>')" />
350 759d0de1 Renato Botelho
			<?php endif; ?>
351
			</td>
352 d16a49ae Colin Fleming
                        <td><a href="firewall_nat_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" alt="add" /></a></td>
353 00bcbdd0 Bill Marquette
                      </tr>
354 d415d821 Seth Mos
                    </table>
355
		  </td>
356 1b43f08f Scott Ullrich
		</tr>
357 5fbcc12a Scott Ullrich
		<tr><td>&nbsp;</td></tr>
358 68b0c7eb Chris Buechler
          <tr>
359 d16a49ae Colin Fleming
            <td width="16"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_pass.gif" width="11" height="11" alt="pass" /></td>
360 ebe08ebe Carlos Eduardo Ramos
            <td colspan="3"><?=gettext("pass"); ?></td>
361 1b43f08f Scott Ullrich
			</tr>
362
		   <tr>
363 d16a49ae Colin Fleming
            <td width="14"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_chain.png" width="11" height="11" alt="chain" /></td>
364 7fcd0934 Renato Botelho
	    <td colspan="3"><?=gettext("linked rule");?></td>
365 68b0c7eb Chris Buechler
          </tr>
366
    </table>
367 d732f186 Bill Marquette
	</div>
368
	</td>
369 5b237745 Scott Ullrich
  </tr>
370
</table>
371 3d335c4d Scott Ullrich
372
<?php
373
if ($pkg['tabs'] <> "") {
374
    echo "</td></tr></table>";
375
}
376
?>
377
378
</form>
379 5b237745 Scott Ullrich
<?php include("fend.inc"); ?>
380
</body>
381
</html>