Project

General

Profile

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