Révision a8590dd6
Ajouté par Colin Fleming il y a presque 10 ans
usr/local/www/diag_ipsec.php | ||
---|---|---|
81 | 81 |
<body link="#0000CC" vlink="#0000CC" alink="#0000CC" onload="<?php echo $jsevents["body"]["onload"]; ?>"> |
82 | 82 |
<?php include("fbegin.inc"); ?> |
83 | 83 |
<div id="inputerrors"></div> |
84 |
<table width="100%" border="0" cellpadding="0" cellspacing="0"> |
|
84 |
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="status ipsec">
|
|
85 | 85 |
<tr> |
86 | 86 |
<td> |
87 | 87 |
<?php |
... | ... | |
97 | 97 |
<tr> |
98 | 98 |
<td> |
99 | 99 |
<div id="mainarea"> |
100 |
<table width="100%" border="0" cellpadding="6" cellspacing="0" class="tabcont sortable"> |
|
100 |
<table width="100%" border="0" cellpadding="6" cellspacing="0" class="tabcont sortable" summary="status">
|
|
101 | 101 |
<thead> |
102 | 102 |
<tr> |
103 |
<th nowrap class="listhdrr"><?php echo gettext("Description");?></th>
|
|
104 |
<th nowrap class="listhdrr"><?php echo gettext("Local ID");?></th>
|
|
105 |
<th nowrap class="listhdrr"><?php echo gettext("Local IP");?></th>
|
|
106 |
<th nowrap class="listhdrr"><?php echo gettext("Remote ID");?></th>
|
|
107 |
<th nowrap class="listhdrr"><?php echo gettext("Remote IP");?></a></th>
|
|
108 |
<th nowrap class="listhdrr"><?php echo gettext("Role");?></a></th>
|
|
109 |
<th nowrap class="listhdrr"><?php echo gettext("Status");?></a></th>
|
|
103 |
<th class="listhdrr nowrap"><?php echo gettext("Description");?></th>
|
|
104 |
<th class="listhdrr nowrap"><?php echo gettext("Local ID");?></th>
|
|
105 |
<th class="listhdrr nowrap"><?php echo gettext("Local IP");?></th>
|
|
106 |
<th class="listhdrr nowrap"><?php echo gettext("Remote ID");?></th>
|
|
107 |
<th class="listhdrr nowrap"><?php echo gettext("Remote IP");?></th>
|
|
108 |
<th class="listhdrr nowrap"><?php echo gettext("Role");?></th>
|
|
109 |
<th class="listhdrr nowrap"><?php echo gettext("Status");?></th>
|
|
110 | 110 |
</tr> |
111 | 111 |
</thead> |
112 | 112 |
<tbody> |
... | ... | |
175 | 175 |
<td class="listbg"> |
176 | 176 |
<?php ?> |
177 | 177 |
</td> |
178 |
<td valign="middle" nowrap class="list">
|
|
179 |
<table border="0" cellspacing="0" cellpadding="1"> |
|
178 |
<td valign="middle" class="list nowrap">
|
|
179 |
<table border="0" cellspacing="0" cellpadding="1" summary="">
|
|
180 | 180 |
</table> |
181 | 181 |
</td> |
182 | 182 |
</tr> |
... | ... | |
184 | 184 |
<tr> |
185 | 185 |
<td class="listrborder" colspan="7"> |
186 | 186 |
<div id="btnchildsa-<?=$ikeid;?>"> |
187 |
<input type="button" onClick="show_childsa('childsa-<?=$ikeid;?>','btnchildsa-<?=$ikeid;?>');" value="+" /> - Show child SA entries</a>
|
|
187 |
<input type="button" onclick="show_childsa('childsa-<?=$ikeid;?>','btnchildsa-<?=$ikeid;?>');" value="+" /> - Show child SA entries
|
|
188 | 188 |
</div> |
189 |
<table class="tabcont" width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" id="childsa-<?=$ikeid;?>" style="display:none"> |
|
189 |
<table class="tabcont" width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" id="childsa-<?=$ikeid;?>" style="display:none" summary="">
|
|
190 | 190 |
<thead> |
191 | 191 |
<tr> |
192 |
<th nowrap class="listhdrr"><?php echo gettext("Local subnets");?></th>
|
|
193 |
<th nowrap class="listhdrr"><?php echo gettext("Local SPI");?></th>
|
|
194 |
<th nowrap class="listhdrr"><?php echo gettext("Remote SPI");?></th>
|
|
195 |
<th nowrap class="listhdrr"><?php echo gettext("Remote subnets");?></th>
|
|
192 |
<th class="listhdrr nowrap"><?php echo gettext("Local subnets");?></th>
|
|
193 |
<th class="listhdrr nowrap"><?php echo gettext("Local SPI");?></th>
|
|
194 |
<th class="listhdrr nowrap"><?php echo gettext("Remote SPI");?></th>
|
|
195 |
<th class="listhdrr nowrap"><?php echo gettext("Remote subnets");?></th>
|
|
196 | 196 |
</tr> |
197 | 197 |
</thead> |
198 | 198 |
<tbody> |
... | ... | |
201 | 201 |
foreach ($ikesa['childsalist']['childsa'] as $childsa) { |
202 | 202 |
?> |
203 | 203 |
<tr valign="top"> |
204 |
<td nowrap class="listlr">
|
|
204 |
<td class="listlr nowrap">
|
|
205 | 205 |
<?php if (is_array($childsa['local']) && is_array($childsa['local']['networks']) && is_array($childsa['local']['networks']['network'])) { |
206 | 206 |
foreach ($childsa['local']['networks']['network'] as $lnets) { |
207 | 207 |
echo htmlspecialchars($lnets) . "<br />"; |
... | ... | |
210 | 210 |
echo "Unknown"; |
211 | 211 |
?> |
212 | 212 |
</td> |
213 |
<td nowrap class="listr">
|
|
213 |
<td class="listr nowrap">
|
|
214 | 214 |
<?php if (is_array($childsa['local'])) |
215 | 215 |
echo htmlspecialchars($childsa['local']['spi']); |
216 | 216 |
?> |
217 | 217 |
</td> |
218 |
<td nowrap class="listr">
|
|
218 |
<td class="listr nowrap">
|
|
219 | 219 |
<?php if (is_array($childsa['remote'])) |
220 | 220 |
echo htmlspecialchars($childsa['remote']['spi']); |
221 | 221 |
?> |
222 | 222 |
</td> |
223 |
<td nowrap class="listlr">
|
|
223 |
<td class="listlr nowrap">
|
|
224 | 224 |
<?php if (is_array($childsa['remote']) && is_array($childsa['remote']['networks']) && is_array($childsa['remote']['networks']['network'])) { |
225 | 225 |
foreach ($childsa['remote']['networks']['network'] as $rnets) { |
226 | 226 |
echo htmlspecialchars($rnets) . "<br />"; |
... | ... | |
229 | 229 |
echo "Unknown"; |
230 | 230 |
?> |
231 | 231 |
</td> |
232 |
<td nowrap class="list">
|
|
232 |
<td class="list nowrap">
|
|
233 | 233 |
|
234 | 234 |
</td> |
235 | 235 |
</tr> |
236 | 236 |
<?php } } ?> |
237 |
<tr style="display:none;"><td></td></tr> |
|
237 | 238 |
</tbody> |
238 | 239 |
</table> |
239 | 240 |
</td> |
... | ... | |
242 | 243 |
} |
243 | 244 |
} |
244 | 245 |
?> |
246 |
<tr style="display:none;"><td></td></tr> |
|
245 | 247 |
</tbody> |
246 | 248 |
</table> |
247 | 249 |
</div> |
248 | 250 |
</td> |
249 | 251 |
</tr> |
250 | 252 |
</table> |
251 |
</div> |
|
252 | 253 |
|
253 |
<span class="vexpl">
|
|
254 |
<p class="vexpl">
|
|
254 | 255 |
<span class="red"> |
255 | 256 |
<strong><?php echo gettext("Note:");?><br /></strong> |
256 | 257 |
</span> |
257 | 258 |
<?php echo gettext("You can configure IPsec");?> |
258 | 259 |
<a href="vpn_ipsec.php">here</a>. |
259 |
</span>
|
|
260 |
</p>
|
|
260 | 261 |
<?php unset($status); include("fend.inc"); ?> |
261 | 262 |
<script type="text/javascript"> |
263 |
//<![CDATA[ |
|
262 | 264 |
function show_childsa(id, buttonid) { |
263 | 265 |
document.getElementById(buttonid).innerHTML=''; |
264 | 266 |
aodiv = document.getElementById(id); |
265 | 267 |
aodiv.style.display = "block"; |
266 | 268 |
} |
269 |
//]]> |
|
267 | 270 |
</script> |
268 | 271 |
</body> |
269 | 272 |
</html> |
usr/local/www/diag_ipsec_sad.php | ||
---|---|---|
66 | 66 |
|
67 | 67 |
<body link="#0000CC" vlink="#0000CC" alink="#0000CC"> |
68 | 68 |
<?php include("fbegin.inc"); ?> |
69 |
<table width="100%" border="0" cellpadding="0" cellspacing="0"> |
|
69 |
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="status ipsec sad">
|
|
70 | 70 |
<tr> |
71 | 71 |
<td> |
72 | 72 |
<?php |
... | ... | |
82 | 82 |
<tr> |
83 | 83 |
<td> |
84 | 84 |
<div id="mainarea"> |
85 |
<table class="tabcont sortable" width="100%" border="0" cellpadding="6" cellspacing="0"> |
|
85 |
<table class="tabcont sortable" width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
|
|
86 | 86 |
<?php if (count($sad)): ?> |
87 | 87 |
<tr> |
88 |
<td nowrap class="listhdrr"><?=gettext("Source");?></td>
|
|
89 |
<td nowrap class="listhdrr"><?=gettext("Destination");?></td>
|
|
90 |
<td nowrap class="listhdrr"><?=gettext("Protocol");?></td>
|
|
91 |
<td nowrap class="listhdrr"><?=gettext("SPI");?></td>
|
|
92 |
<td nowrap class="listhdrr"><?=gettext("Enc. alg.");?></td>
|
|
93 |
<td nowrap class="listhdr"><?=gettext("Auth. alg.");?></td>
|
|
94 |
<td nowrap class="listhdr"><?=gettext("Data");?></td>
|
|
95 |
<td nowrap class="list"></td>
|
|
88 |
<td class="listhdrr nowrap"><?=gettext("Source");?></td>
|
|
89 |
<td class="listhdrr nowrap"><?=gettext("Destination");?></td>
|
|
90 |
<td class="listhdrr nowrap"><?=gettext("Protocol");?></td>
|
|
91 |
<td class="listhdrr nowrap"><?=gettext("SPI");?></td>
|
|
92 |
<td class="listhdrr nowrap"><?=gettext("Enc. alg.");?></td>
|
|
93 |
<td class="listhdr nowrap"><?=gettext("Auth. alg.");?></td>
|
|
94 |
<td class="listhdr nowrap"><?=gettext("Data");?></td>
|
|
95 |
<td class="list nowrap"></td>
|
|
96 | 96 |
</tr> |
97 | 97 |
<?php foreach ($sad as $sa): ?> |
98 | 98 |
<tr> |
... | ... | |
103 | 103 |
<td class="listr"><?=htmlspecialchars($sa['ealgo']);?></td> |
104 | 104 |
<td class="listr"><?=htmlspecialchars($sa['aalgo']);?></td> |
105 | 105 |
<td class="listr"><?=htmlspecialchars($sa['data']);?></td> |
106 |
<td class="list" nowrap>
|
|
106 |
<td class="list nowrap">
|
|
107 | 107 |
<?php |
108 | 108 |
$args = "src=" . rawurlencode($sa['src']); |
109 |
$args .= "&dst=" . rawurlencode($sa['dst']); |
|
110 |
$args .= "&proto=" . rawurlencode($sa['proto']); |
|
111 |
$args .= "&spi=" . rawurlencode("0x" . $sa['spi']); |
|
109 |
$args .= "&dst=" . rawurlencode($sa['dst']);
|
|
110 |
$args .= "&proto=" . rawurlencode($sa['proto']);
|
|
111 |
$args .= "&spi=" . rawurlencode("0x" . $sa['spi']);
|
|
112 | 112 |
?> |
113 |
<a href="diag_ipsec_sad.php?act=del&<?=$args;?>" onclick="return confirm('<?=gettext("Do you really want to delete this security association?"); ?>')"> |
|
114 |
<img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"> |
|
113 |
<a href="diag_ipsec_sad.php?act=del&<?=$args;?>" onclick="return confirm('<?=gettext("Do you really want to delete this security association?"); ?>')">
|
|
114 |
<img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" alt="delete" />
|
|
115 | 115 |
</a> |
116 | 116 |
</td> |
117 | 117 |
</tr> |
... | ... | |
129 | 129 |
</tr> |
130 | 130 |
</table> |
131 | 131 |
|
132 |
<p/> |
|
133 |
|
|
134 |
<span class="vexpl"> |
|
132 |
<p class="vexpl"> |
|
135 | 133 |
<span class="red"><strong><?=gettext("Note:");?><br /></strong></span> |
136 | 134 |
<?=gettext("You can configure your IPsec");?> <a href="vpn_ipsec.php"><?=gettext("here.");?></a> |
137 |
</span>
|
|
135 |
</p>
|
|
138 | 136 |
|
139 | 137 |
<?php include("fend.inc"); ?> |
140 | 138 |
</body> |
usr/local/www/diag_ipsec_spd.php | ||
---|---|---|
65 | 65 |
|
66 | 66 |
<body link="#0000CC" vlink="#0000CC" alink="#0000CC"> |
67 | 67 |
<?php include("fbegin.inc"); ?> |
68 |
<table width="100%" border="0" cellpadding="0" cellspacing="0"> |
|
68 |
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="status ipsec spd">
|
|
69 | 69 |
<tr> |
70 | 70 |
<td> |
71 | 71 |
<?php |
... | ... | |
81 | 81 |
<tr> |
82 | 82 |
<td> |
83 | 83 |
<div id="mainarea" style="background:#eeeeee"> |
84 |
<table class="tabcont sortable" width="100%" border="0" cellpadding="6" cellspacing="0"> |
|
84 |
<table class="tabcont sortable" width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
|
|
85 | 85 |
<?php if (count($spd)): ?> |
86 | 86 |
<tr> |
87 |
<td nowrap class="listhdrr"><?= gettext("Source"); ?></td>
|
|
88 |
<td nowrap class="listhdrr"><?= gettext("Destination"); ?></td>
|
|
89 |
<td nowrap class="listhdrr"><?= gettext("Direction"); ?></td>
|
|
90 |
<td nowrap class="listhdrr"><?= gettext("Protocol"); ?></td>
|
|
91 |
<td nowrap class="listhdrr"><?= gettext("Tunnel endpoints"); ?></td>
|
|
92 |
<td nowrap class="list"></td>
|
|
87 |
<td class="listhdrr nowrap"><?= gettext("Source"); ?></td>
|
|
88 |
<td class="listhdrr nowrap"><?= gettext("Destination"); ?></td>
|
|
89 |
<td class="listhdrr nowrap"><?= gettext("Direction"); ?></td>
|
|
90 |
<td class="listhdrr nowrap"><?= gettext("Protocol"); ?></td>
|
|
91 |
<td class="listhdrr nowrap"><?= gettext("Tunnel endpoints"); ?></td>
|
|
92 |
<td class="list nowrap"></td>
|
|
93 | 93 |
</tr> |
94 | 94 |
<?php foreach ($spd as $sp): ?> |
95 | 95 |
<tr> |
96 | 96 |
<td class="listlr" valign="top"><?=htmlspecialchars($sp['srcid']);?></td> |
97 | 97 |
<td class="listr" valign="top"><?=htmlspecialchars($sp['dstid']);?></td> |
98 | 98 |
<td class="listr" valign="top"> |
99 |
<img src="/themes/<?= $g['theme']; ?>/images/icons/icon_<?=$sp['dir'];?>.gif" width="11" height="11" style="margin-top: 2px"> |
|
99 |
<img src="/themes/<?= $g['theme']; ?>/images/icons/icon_<?=$sp['dir'];?>.gif" width="11" height="11" style="margin-top: 2px" alt="direction" />
|
|
100 | 100 |
</td> |
101 | 101 |
<td class="listr" valign="top"><?=htmlspecialchars(strtoupper($sp['proto']));?></td> |
102 | 102 |
<td class="listr" valign="top"><?=htmlspecialchars($sp['src']);?> -> <?=htmlspecialchars($sp['dst']);?></td> |
103 |
<td class="list" nowrap>
|
|
103 |
<td class="list nowrap">
|
|
104 | 104 |
<?php |
105 | 105 |
$args = "srcid=".rawurlencode($sp['srcid']); |
106 |
$args .= "&dstid=".rawurlencode($sp['dstid']); |
|
107 |
$args .= "&dir=".rawurlencode($sp['dir']); |
|
106 |
$args .= "&dstid=".rawurlencode($sp['dstid']);
|
|
107 |
$args .= "&dir=".rawurlencode($sp['dir']);
|
|
108 | 108 |
?> |
109 |
<a href="diag_ipsec_spd.php?act=del&<?=$args;?>" onclick="return confirm('<?= gettext("Do you really want to delete this security policy?"); ?>')"> |
|
110 |
<img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"> |
|
109 |
<a href="diag_ipsec_spd.php?act=del&<?=$args;?>" onclick="return confirm('<?= gettext("Do you really want to delete this security policy?"); ?>')">
|
|
110 |
<img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" alt="delete" />
|
|
111 | 111 |
</a> |
112 | 112 |
</td> |
113 | 113 |
</tr> |
114 | 114 |
<?php endforeach; ?> |
115 | 115 |
</table> |
116 | 116 |
<br /> |
117 |
<table class="tabcont" border="0" cellspacing="0" cellpadding="6"> |
|
117 |
<table class="tabcont" border="0" cellspacing="0" cellpadding="6" summary="policies">
|
|
118 | 118 |
<tr> |
119 |
<td width="16"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_in.gif" width="11" height="11"></td> |
|
119 |
<td width="16"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_in.gif" width="11" height="11" alt="in" /></td>
|
|
120 | 120 |
<td><?= gettext("incoming (as seen by firewall)"); ?></td> |
121 | 121 |
</tr> |
122 | 122 |
<tr> |
123 | 123 |
<td colspan="5" height="4"></td> |
124 | 124 |
</tr> |
125 | 125 |
<tr> |
126 |
<td><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_out.gif" width="11" height="11"></td> |
|
126 |
<td><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_out.gif" width="11" height="11" alt="out" /></td>
|
|
127 | 127 |
<td><?= gettext("outgoing (as seen by firewall)"); ?></td> |
128 | 128 |
</tr> |
129 | 129 |
<?php else: ?> |
... | ... | |
139 | 139 |
</tr> |
140 | 140 |
</table> |
141 | 141 |
|
142 |
<p> |
|
143 |
<span class="vexpl"> |
|
142 |
<p class="vexpl"> |
|
144 | 143 |
<span class="red"><strong><?= gettext("Note:"); ?><br /></strong></span> |
145 | 144 |
<?= gettext("You can configure your IPsec"); ?> <a href="vpn_ipsec.php"><?= gettext("here."); ?></a> |
146 |
</span>
|
|
145 |
</p>
|
|
147 | 146 |
|
148 | 147 |
<?php include("fend.inc"); ?> |
149 | 148 |
</body> |
150 | 149 |
</html> |
151 |
|
Formats disponibles : Unified diff
Tidy up "diag_ipsec" XHTML
Add SUMMARY to TABLES
Move NOWRAP into CLASS statement
Close INPUT and IMG tags and add ALT to IMG tag
Add dummy row to TBODY but don't display it
Deprecate Ampersand in ANCHOR tag