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 ed2d1343 Renato Botelho
        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
		write_config();
67
68 5b237745 Scott Ullrich
		$retval = 0;
69 7a6c350f Scott Ullrich
70 7d04082e Scott Ullrich
		unlink_if_exists("/tmp/config.cache");
71 e2c9ef13 Scott Ullrich
		$retval |= filter_configure();
72 05da8941 Erik Fonnesbeck
		$savemsg = get_std_save_message($retval);
73 7d04082e Scott Ullrich
74 1a700ea6 Scott Ullrich
		pfSense_handle_custom_code("/usr/local/pkg/firewall_nat/apply");
75
76 5b237745 Scott Ullrich
		if ($retval == 0) {
77 a368a026 Ermal Lu?i
			clear_subsystem_dirty('natconf');
78
			clear_subsystem_dirty('filter');
79 5b237745 Scott Ullrich
		}
80 7d04082e Scott Ullrich
81 5b237745 Scott Ullrich
	}
82
}
83
84 759d0de1 Renato Botelho
if ($_GET['act'] == "del") {
85
	if ($a_nat[$_GET['id']]) {
86 3a343d73 jim-p
87 759d0de1 Renato Botelho
		if (isset($a_nat[$_GET['id']]['associated-rule-id'])) {
88
			delete_id($a_nat[$_GET['id']]['associated-rule-id'], $config['filter']['rule']);
89 3a343d73 jim-p
			$want_dirty_filter = true;
90 759d0de1 Renato Botelho
		}
91
		unset($a_nat[$_GET['id']]);
92 3a343d73 jim-p
93
		if (write_config()) {
94
			mark_subsystem_dirty('natconf');
95
			if ($want_dirty_filter)
96
				mark_subsystem_dirty('filter');
97
		}
98 759d0de1 Renato Botelho
		header("Location: firewall_nat.php");
99
		exit;
100
	}
101
}
102
103 00bcbdd0 Bill Marquette
if (isset($_POST['del_x'])) {
104 4b9a670c Scott Ullrich
    /* delete selected rules */
105
    if (is_array($_POST['rule']) && count($_POST['rule'])) {
106
	    foreach ($_POST['rule'] as $rulei) {
107 049a688e Ermal Lu?i
		$target = $rule['target'];
108 b9e28d57 unknown
			// Check for filter rule associations
109 9b16b834 Ermal Lu?i
			if (isset($a_nat[$rulei]['associated-rule-id'])){
110
				delete_id($a_nat[$rulei]['associated-rule-id'], $config['filter']['rule']);
111 b9e28d57 unknown
				
112
				mark_subsystem_dirty('filter');
113
			}
114 4b9a670c Scott Ullrich
	        unset($a_nat[$rulei]);
115
	    }
116 3a343d73 jim-p
		if (write_config())
117
			mark_subsystem_dirty('natconf');
118
		header("Location: firewall_nat.php");
119
		exit;
120 4b9a670c Scott Ullrich
	}
121 00bcbdd0 Bill Marquette
122
} else {
123
        /* yuck - IE won't send value attributes for image buttons, while Mozilla does - so we use .x/.y to find move button clicks instead... */
124
        unset($movebtn);
125
        foreach ($_POST as $pn => $pd) {
126
                if (preg_match("/move_(\d+)_x/", $pn, $matches)) {
127
                        $movebtn = $matches[1];
128
                        break;
129
                }
130
        }
131
        /* move selected rules before this rule */
132
        if (isset($movebtn) && is_array($_POST['rule']) && count($_POST['rule'])) {
133
                $a_nat_new = array();
134
135
                /* copy all rules < $movebtn and not selected */
136
                for ($i = 0; $i < $movebtn; $i++) {
137
                        if (!in_array($i, $_POST['rule']))
138
                                $a_nat_new[] = $a_nat[$i];
139
                }
140
141
                /* copy all selected rules */
142
                for ($i = 0; $i < count($a_nat); $i++) {
143
                        if ($i == $movebtn)
144
                                continue;
145
                        if (in_array($i, $_POST['rule']))
146
                                $a_nat_new[] = $a_nat[$i];
147
                }
148
149
                /* copy $movebtn rule */
150
                if ($movebtn < count($a_nat))
151
                        $a_nat_new[] = $a_nat[$movebtn];
152
153
                /* copy all rules > $movebtn and not selected */
154
                for ($i = $movebtn+1; $i < count($a_nat); $i++) {
155
                        if (!in_array($i, $_POST['rule']))
156
                                $a_nat_new[] = $a_nat[$i];
157
                }
158
                $a_nat = $a_nat_new;
159 3a343d73 jim-p
		if (write_config())
160
			mark_subsystem_dirty('natconf');
161 00bcbdd0 Bill Marquette
                header("Location: firewall_nat.php");
162
                exit;
163
        }
164 5b237745 Scott Ullrich
}
165 00bcbdd0 Bill Marquette
166 d16a49ae Colin Fleming
$closehead = false;
167 7fcd0934 Renato Botelho
$pgtitle = array(gettext("Firewall"),gettext("NAT"),gettext("Port Forward"));
168 6eb17647 Scott Ullrich
include("head.inc");
169
170 91f026b0 ayvis
echo "<script type=\"text/javascript\" src=\"/javascript/domTT/domLib.js\"></script>";
171
echo "<script type=\"text/javascript\" src=\"/javascript/domTT/domTT.js\"></script>";
172
echo "<script type=\"text/javascript\" src=\"/javascript/domTT/behaviour.js\"></script>";
173
echo "<script type=\"text/javascript\" src=\"/javascript/domTT/fadomatic.js\"></script>";
174 2a9db752 Scott Dale
175 24f600b0 Scott Ullrich
?>
176 d16a49ae Colin Fleming
</head>
177
178 a8726a3d Scott Ullrich
<body link="#000000" vlink="#000000" alink="#000000">
179 5b237745 Scott Ullrich
<?php include("fbegin.inc"); ?>
180 00bcbdd0 Bill Marquette
<form action="firewall_nat.php" method="post" name="iform">
181 07130afe ayvis
<script type="text/javascript" src="/javascript/row_toggle.js"></script>
182 05da8941 Erik Fonnesbeck
<?php if ($savemsg) print_info_box($savemsg); ?>
183 d16a49ae Colin Fleming
<?php if (is_subsystem_dirty('natconf')): ?>
184 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 />
185 5b237745 Scott Ullrich
<?php endif; ?>
186 d16a49ae Colin Fleming
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="firewall nat">
187 5b237745 Scott Ullrich
  <tr><td>
188 a8726a3d Scott Ullrich
<?php
189
	$tab_array = array();
190 5463dd9f me
	$tab_array[] = array(gettext("Port Forward"), true, "firewall_nat.php");
191 7fcd0934 Renato Botelho
	$tab_array[] = array(gettext("1:1"), false, "firewall_nat_1to1.php");
192 5463dd9f me
	$tab_array[] = array(gettext("Outbound"), false, "firewall_nat_out.php");
193 292ef22a Seth Mos
	$tab_array[] = array(gettext("NPt"), false, "firewall_nat_npt.php");
194 a8726a3d Scott Ullrich
	display_top_tabs($tab_array);
195
?>
196
 </td></tr>
197 340e6dca Scott Ullrich
  <tr>
198 d732f186 Bill Marquette
    <td>
199
	<div id="mainarea">
200 d16a49ae Colin Fleming
              <table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0" summary="main area">
201 00bcbdd0 Bill Marquette
                <tr id="frheader">
202
		  <td width="3%" class="list">&nbsp;</td>
203
                  <td width="3%" class="list">&nbsp;</td>
204 7fcd0934 Renato Botelho
		  <td width="5%" class="listhdrr"><?=gettext("If");?></td>
205
		  <td width="5%" class="listhdrr"><?=gettext("Proto");?></td>
206 d16a49ae Colin Fleming
		  <td width="11%" class="listhdrr nowrap"><?=gettext("Src. addr");?></td>
207
		  <td width="11%" class="listhdrr nowrap"><?=gettext("Src. ports");?></td>
208
		  <td width="11%" class="listhdrr nowrap"><?=gettext("Dest. addr");?></td>
209
		  <td width="11%" class="listhdrr nowrap"><?=gettext("Dest. ports");?></td>
210
		  <td width="11%" class="listhdrr nowrap"><?=gettext("NAT IP");?></td>
211
		  <td width="11%" class="listhdrr nowrap"><?=gettext("NAT Ports");?></td>
212 7fcd0934 Renato Botelho
		  <td width="11%" class="listhdr"><?=gettext("Description");?></td>
213 d415d821 Seth Mos
                  <td width="5%" class="list">
214 d16a49ae Colin Fleming
                    <table border="0" cellspacing="0" cellpadding="1" summary="list">
215 d415d821 Seth Mos
                      <tr>
216 759d0de1 Renato Botelho
			<td width="17">
217
			<?php if (count($a_nat) == 0): ?>
218 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" />
219 759d0de1 Renato Botelho
			<?php else: ?>
220 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?");?>')" />
221 759d0de1 Renato Botelho
			<?php endif; ?>
222
			</td>
223 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>
224 d415d821 Seth Mos
                      </tr>
225
                    </table>
226
		  </td>
227 00bcbdd0 Bill Marquette
		</tr>
228
	<?php $nnats = $i = 0; foreach ($a_nat as $natent): ?>
229 40b56dc1 Scott Ullrich
	<?php 
230 2a9db752 Scott Dale
	
231
		//build Alias popup box
232
		$span_end = "</U></span>";
233 ec223192 Renato Botelho
234
		$alias_popup = rule_popup($natent['source']['address'], pprint_port($natent['source']['port']), $natent['destination']['address'], pprint_port($natent['destination']['port']));
235
236
		$alias_src_span_begin      = $alias_popup["src"];
237 2a9db752 Scott Dale
		$alias_src_port_span_begin = $alias_popup["srcport"];
238 ec223192 Renato Botelho
		$alias_dst_span_begin      = $alias_popup["dst"];
239 2a9db752 Scott Dale
		$alias_dst_port_span_begin = $alias_popup["dstport"];
240
241 00ad21b9 Darren Embry
		$alias_src_span_end        = $alias_popup["src_end"];
242
		$alias_src_port_span_end   = $alias_popup["srcport_end"];
243
		$alias_dst_span_end        = $alias_popup["dst_end"];
244
		$alias_dst_port_span_end   = $alias_popup["dstport_end"];
245
246 ec223192 Renato Botelho
		$alias_popup = rule_popup("","",$natent['target'], pprint_port($natent['local-port']));
247
248
		$alias_target_span_begin     = $alias_popup["dst"];
249
		$alias_local_port_span_begin = $alias_popup["dstport"];
250 6a459cef Renato Botelho
251 00ad21b9 Darren Embry
		$alias_target_span_end       = $alias_popup["dst_end"];
252
		$alias_local_port_span_end   = $alias_popup["dstport_end"];
253
254 96cde230 Renato Botelho
		if (isset($natent['disabled']))
255 6a459cef Renato Botelho
			$textss = "<span class=\"gray\">";
256 96cde230 Renato Botelho
		else
257
			$textss = "<span>";
258
259
		$textse = "</span>";
260 2a9db752 Scott Dale
	
261 40b56dc1 Scott Ullrich
		/* if user does not have access to edit an interface skip on to the next record */
262
		if(!have_natpfruleint_access($natent['interface'])) 
263
			continue;
264
	?>
265 00bcbdd0 Bill Marquette
                <tr valign="top" id="fr<?=$nnats;?>">
266 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>
267 b9e28d57 unknown
                  <td class="listt" align="center">
268 9b16b834 Ermal Lu?i
					<?php if($natent['associated-rule-id'] == "pass"): ?>
269 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" />
270 3bb6bb18 Vinicius Coque
					<?php elseif (!empty($natent['associated-rule-id'])): ?>
271 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" />
272 537dff78 Chris Buechler
					<?php endif; ?>
273 b9e28d57 unknown
				  </td>
274 b8a0de00 Bill Marquette
                  <td class="listlr" onClick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_edit.php?id=<?=$nnats;?>';">
275 6a459cef Renato Botelho
                    <?=$textss;?>
276 8b1fab53 Scott Ullrich
		    <?php
277 8b35aa77 Erik Fonnesbeck
			if (!$natent['interface'])
278
				echo htmlspecialchars(convert_friendly_interface_to_friendly_descr("wan"));
279 00bcbdd0 Bill Marquette
			else
280 8b35aa77 Erik Fonnesbeck
				echo htmlspecialchars(convert_friendly_interface_to_friendly_descr($natent['interface']));
281 00bcbdd0 Bill Marquette
		    ?>
282 6a459cef Renato Botelho
                    <?=$textse;?>
283 5b237745 Scott Ullrich
                  </td>
284 ec223192 Renato Botelho
285 d16a49ae Colin Fleming
                  <td class="listr" onclick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_edit.php?id=<?=$nnats;?>';">
286 6a459cef Renato Botelho
					<?=$textss;?><?=strtoupper($natent['protocol']);?><?=$textse;?>
287 5b237745 Scott Ullrich
                  </td>
288 ec223192 Renato Botelho
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_span_begin;?><?php echo htmlspecialchars(pprint_address($natent['source']));?><?php echo $alias_src_span_end;?><?=$textse;?>
291
                  </td>
292 d16a49ae Colin Fleming
                  <td class="listr" onclick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_edit.php?id=<?=$nnats;?>';">
293 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;?>
294
                  </td>
295
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_span_begin;?><?php echo htmlspecialchars(pprint_address($natent['destination']));?><?php echo $alias_dst_span_end;?><?=$textse;?>
298 5b237745 Scott Ullrich
                  </td>
299 d16a49ae Colin Fleming
                  <td class="listr" onclick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_edit.php?id=<?=$nnats;?>';">
300 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;?>
301 5b237745 Scott Ullrich
                  </td>
302 ec223192 Renato Botelho
303 d16a49ae Colin Fleming
                  <td class="listr" onclick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_edit.php?id=<?=$nnats;?>';">
304 ec223192 Renato Botelho
				    <?=$textss;?><?php echo $alias_target_span_begin;?><?php echo htmlspecialchars($natent['target']);?><?php echo $alias_target_span_end;?><?=$textse;?>
305 5b237745 Scott Ullrich
                  </td>
306 d16a49ae Colin Fleming
                  <td class="listr" onclick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_edit.php?id=<?=$nnats;?>';">
307 47c5a08f Renato Botelho
					<?php
308 50dc3f41 Renato Botelho
						$localport = $natent['local-port'];
309
310 cfbfd941 smos
						list($dstbeginport, $dstendport) = explode("-", $natent['destination']['port']);
311 50dc3f41 Renato Botelho
312
						if ($dstendport) {
313
							$localendport = $natent['local-port'] + $dstendport - $dstbeginport;
314
							$localport   .= '-' . $localendport;
315
						}
316 47c5a08f Renato Botelho
					?>
317
				    <?=$textss;?><?php echo $alias_local_port_span_begin;?><?php echo htmlspecialchars(pprint_port($localport));?><?php echo $alias_local_port_span_end;?><?=$textse;?>
318 ec223192 Renato Botelho
                  </td>
319
320 d16a49ae Colin Fleming
                  <td class="listbg" onclick="fr_toggle(<?=$nnats;?>)" ondblclick="document.location='firewall_nat_edit.php?id=<?=$nnats;?>';">
321 6a459cef Renato Botelho
				  <?=$textss;?><?=htmlspecialchars($natent['descr']);?>&nbsp;<?=$textse;?>
322 5b237745 Scott Ullrich
                  </td>
323 d16a49ae Colin Fleming
                  <td valign="middle" class="list nowrap">
324
                    <table border="0" cellspacing="0" cellpadding="1" summary="move">
325 00bcbdd0 Bill Marquette
                      <tr>
326 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>
327 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>
328 00bcbdd0 Bill Marquette
                      </tr>
329
                      <tr>
330 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>
331 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>
332 00bcbdd0 Bill Marquette
                      </tr>
333
                    </table>
334
		</tr>
335
  	     <?php $i++; $nnats++; endforeach; ?>
336 340e6dca Scott Ullrich
                <tr>
337 00bcbdd0 Bill Marquette
                  <td class="list" colspan="8"></td>
338 ec223192 Renato Botelho
                  <td>&nbsp;</td>
339
                  <td>&nbsp;</td>
340
                  <td>&nbsp;</td>
341 d16a49ae Colin Fleming
                  <td class="list nowrap" valign="middle">
342
                    <table border="0" cellspacing="0" cellpadding="1" summary="move">
343 00bcbdd0 Bill Marquette
                      <tr>
344 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>
345 00bcbdd0 Bill Marquette
                      </tr>
346
                      <tr>
347 759d0de1 Renato Botelho
			<td width="17">
348
			<?php if (count($a_nat) == 0): ?>
349 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" />
350 759d0de1 Renato Botelho
			<?php else: ?>
351 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?");?>')" />
352 759d0de1 Renato Botelho
			<?php endif; ?>
353
			</td>
354 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>
355 00bcbdd0 Bill Marquette
                      </tr>
356 d415d821 Seth Mos
                    </table>
357
		  </td>
358 1b43f08f Scott Ullrich
		</tr>
359 5fbcc12a Scott Ullrich
		<tr><td>&nbsp;</td></tr>
360 68b0c7eb Chris Buechler
          <tr>
361 d16a49ae Colin Fleming
            <td width="16"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_pass.gif" width="11" height="11" alt="pass" /></td>
362 ebe08ebe Carlos Eduardo Ramos
            <td colspan="3"><?=gettext("pass"); ?></td>
363 1b43f08f Scott Ullrich
			</tr>
364
		   <tr>
365 d16a49ae Colin Fleming
            <td width="14"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_chain.png" width="11" height="11" alt="chain" /></td>
366 7fcd0934 Renato Botelho
	    <td colspan="3"><?=gettext("linked rule");?></td>
367 68b0c7eb Chris Buechler
          </tr>
368
    </table>
369 d732f186 Bill Marquette
	</div>
370
	</td>
371 5b237745 Scott Ullrich
  </tr>
372
</table>
373 3d335c4d Scott Ullrich
374
<?php
375
if ($pkg['tabs'] <> "") {
376
    echo "</td></tr></table>";
377
}
378
?>
379
380
</form>
381 5b237745 Scott Ullrich
<?php include("fend.inc"); ?>
382
</body>
383
</html>