|
.TreeMenu_0 { margin-left:0px; text-align:left; line-height:135%; }
.TreeMenu_0 a { padding-left:4px; color:#444444; display:block; }
.TreeMenu_0 a:hover { color:#000000; }
.TreeNode_1 { padding-left:0px; }
.TreeNode_2 { padding-left:0px; }
.TreeNode_3 { padding-left:15px; }
.TreeNode_4 { padding-left:30px; }
.TreeNode_5 { padding-left:45px; }
.TreeNode_6 { padding-left:60px; }
.TreeNode_7 { padding-left:75px; }
.TreeNode_8 { padding-left:90px; }
.TreeNode_9 { padding-left:105px; }
.TreeNode_1 a { padding-left:12px; background:url(/main/themes/ns/css_Default/TreeNode0.gif) no-repeat; }
.TreeNode_2 a { padding-left:12px; background:url(/main/themes/ns/css_Default/TreeNode1.gif) no-repeat; }
.TreeNode_3 a { padding-left:12px; background:url(/main/themes/ns/css_Default/TreeNode2.gif) no-repeat; }
.TreeNode_4 a, .TreeNode_5 a, .TreeNode_6 a, .TreeNode_7 a, .TreeNode_8 a, .TreeNode_9 a { padding-left:12px; background:url(/main/themes/ns/css_Default/TreeNode3.gif) no-repeat; }
.TreeNode_1, .TreeNode_2, .TreeNode_3, .TreeNode_4, .TreeNode_5, .TreeNode_6, .TreeNode_7, .TreeNode_8, .TreeNode_9 { padding-top:2px; padding-bottom:2px; }
.TreeNode_1:hover, .TreeNode_2:hover, .TreeNode_3:hover, .TreeNode_4:hover, .TreeNode_5:hover, .TreeNode_6:hover, .TreeNode_7:hover, .TreeNode_8:hover, .TreeNode_9:hover { background:#dddddd; }
.TreeMenu_0 .ClassNum { color:#666666; }
.TreeMenu_0 .TreeNode_t { background:#aaaaaa; }
.TreeMenu_0 a.TreeItem_t { color:#ffffff; }
.TreeMenu_0 .ClassDesc { display:block; }
.TreeMenu_0 a { font-family:$BlogTreeItemFont$; color:$color$; font-size:$size$; font-style:$style$; font-weight:$weight$; }
.TreeMenu_0 a:hover { color:$BlogTreeNodeHOverC$; }
.TreeNode_1:hover, .TreeNode_2:hover, .TreeNode_3:hover, .TreeNode_4:hover, .TreeNode_5:hover, .TreeNode_6:hover, .TreeNode_7:hover, .TreeNode_8:hover, .TreeNode_9:hover { background:$BlogTreeNodeHOverB$; }
.TreeMenu_0 a.TreeItem_t { color:$BlogTreeNodeTC$; }
.TreeMenu_0 .TreeNode_t { background:$BlogTreeNodeTB$; }
.TreeNode_1, .TreeNode_2, .TreeNode_3, .TreeNode_4, .TreeNode_5, .TreeNode_6, .TreeNode_7, .TreeNode_8, .TreeNode_9, .TreeNode_t { padding-top:$BlogTreeNodePadding$; padding-bottom:$BlogTreeNodePadding$; }
.TreeMenu_0 { border-bottom:$BlogTreeNodeBorderT$; }
.TreeNode_1, .TreeNode_2, .TreeNode_3, .TreeNode_4, .TreeNode_5, .TreeNode_6, .TreeNode_7, .TreeNode_8, .TreeNode_9, .TreeNode_t { border-top:$BlogTreeNodeBorderT$; }
.TreeMenu_0 { border-top:$BlogTreeNodeBorderB$; }
.TreeNode_1, .TreeNode_2, .TreeNode_3, .TreeNode_4, .TreeNode_5, .TreeNode_6, .TreeNode_7, .TreeNode_8, .TreeNode_9, .TreeNode_t { border-bottom:$BlogTreeNodeBorderB$; }
.TreeNode_1 a { background:$BlogTreeNodeImg1$ no-repeat; }
.TreeNode_2 a { background:$BlogTreeNodeImg2$ no-repeat; }
.TreeNode_3 a { background:$BlogTreeNodeImg3$ no-repeat; }
.TreeNode_4 a, .TreeNode_5 a, .TreeNode_6 a, .TreeNode_7 a, .TreeNode_8 a, .TreeNode_9 a { background:$BlogTreeNodeImg4$ no-repeat; }
.TreeNode_1 a { padding-left:$BlogTreeItem1Margin$; }
.TreeNode_2 a { padding-left:$BlogTreeItem2Margin$; }
.TreeNode_3 a { padding-left:$BlogTreeItem3Margin$; }
.TreeNode_4 a, .TreeNode_5 a, .TreeNode_6 a, .TreeNode_7 a, .TreeNode_8 a, .TreeNode_9 a { padding-left:$BlogTreeItemXMargin$; }
.TreeNode_4, .TreeNode_5, .TreeNode_6, .TreeNode_7, .TreeNode_8, .TreeNode_9 { float:$BlogTreeNode4Float$; }
.TreeNode_1, .TreeNode_2, .TreeNode_3 { clear:both; }
.TreeMenu_0 .ClassName { display:$BlogTreeNodeDispName$; }
.TreeMenu_0 { line-height:$BlogTreeNodeLineHeight$; }
.TreeMenu_0 .ClassNum { display:$BlogTreeNodeDispNum$; }
.TreeMenu_0 .ClassNum { font-family:$BlogTreeNodeFontNum$; color:$color$; font-size:$size$; font-style:$style$; font-weight:$weight$; }
.TreeMenu_0 .ClassDesc { display:$BlogTreeNodeDispDesc$; }
.TreeMenu_0 .ClassDesc { font-family:$BlogTreeNodeFontDesc$; color:$color$; font-size:$size$; font-style:$style$; font-weight:$weight$; }
.TreeMenu_0 .ClassImg { display:$BlogTreeNodeDispImg$; }
.TreeMenu_0 .ClassImg img { height:$BlogTreeNodeSizeImg$; }
.TreeMenu_0 .ClassImg img { margin-right:$BlogTreeNodeRightImg$; }
.TreeMenu_0 .ClassImg img { margin-bottom:$BlogTreeNodeBottomImg$; }
|
| | |
|
$XmlID$ $GroupName$ $CtrlBtn$
$html$
評論: $ChildNum$ 瀏覽: $ClickNum$
於 $Date$ $Time$ 發表
.dataBlogInfo { } /* MsgInfo Cell */
/* 上方類別選項 */
.BlogInfoMenu { width:100%; height:30px; text-align:center; line-height:100%; }
.BlogInfoMenuS { width:1px; background:#ff8844; } /* 選項間隔 */
.BlogInfoMenuL { width:10px; background:#ff8844; } /* 左邊 td */
.BlogInfoMenuR { width:10px; background:#ff8844; } /* 右邊 td */
.BlogInfoMenu0 { background:#ff8844; padding:0px; vertical-align:middle; } /* 選項屬性 */
.BlogInfoMenu0:hover { background:#ff4422; } /* 選項滑鼠觸碰 */
.BlogInfoMenu1 { background:#ff4422; padding:0px; vertical-align:middle; } /* 目前選項屬性 */
.BlogInfoMenu0 a , .BlogInfoMenu1 a { color:#ffffff; } /* 選項文字屬性 */
.BlogInfoN_1 { } /* 第一筆資訊 */
.BlogInfoD_0 { padding:5px; border:1px solid #cccccc; -webkit-border-radius:5px; -moz-border-radius:5px; border-radius:5px; } /* 偶數筆資訊 */
.BlogInfoD_1 { padding:5px; border:1px solid #cccccc; -webkit-border-radius:5px; -moz-border-radius:5px; border-radius:5px; } /* 奇數筆資訊 */
/* 資訊狀態列 */
.BlogInfoCtrlBtn { vertical-align:middle; width:100%; text-align:right; }
.BlogInfoCtrlBtn .OrdIdx { width:20px; text-align:right; border:1px solid #888888; padding:0px; margin:0px; height:16px; }
.BlogInfoCtrlBtn .MsgCmd { font-size:11px; border:1px solid #888888; padding:0px; margin:0px; height:18px; }
.BlogInfoCtrlBtn .XmlID { float:left; font-weight:bold; }
.BlogInfoCtrlBtn select { display:none; }
/* 資訊區 */
.BlogInfoHTML { }
/* 資訊區上方資訊 */
.BlogInfoHTML .BlogInfo1 { width:100%; color:#888888; margin-bottom:10px; border-bottom:1px solid #cccccc; }
.BlogInfoHTML .BlogInfoAuthor { float:right; } /* 作者 */
.BlogInfoHTML .BlogInfoClass { width:auto; text-align:left; color:#888888; } /* 類別 */
/* 資訊區下方資訊 */
.BlogInfoHTML .BlogInfo3 { width:100%; color:#888888; }
.BlogInfoHTML .BlogInfoStatus { float:right; }
.BlogInfoHTML .BlogInfoBtn { text-align:left; }
/* 資訊內文 */
#ns_Content .BlogInfoHTML .meMsg_MsgTitleBlk { margin-bottom:10px; } /* 區塊標頭 */
#ns_Content .BlogInfoHTML .meMsg_MsgBlk .meMsg_MsgTitle { } /* 主標題 */
#ns_Content .BlogInfoHTML .meMsg_Content { margin-top:10px; }
#ns_Content .BlogInfoHTML .meMsg_MsgContentBlk { margin-top:30px; } /* 內文段落 */
#ns_Content .BlogInfoHTML .meMsg_MsgURLList { display:none; margin:0px; padding:0px; } /* 相關網址 */
#ns_Content .BlogInfoHTML .meMsg_MsgURL { list-style:disc; margin-left:40px; } /* 相關網址 */
#ns_Content .BlogInfoHTML .meMsg_MsgFileList { display:none; margin:0px; padding:0px; } /* 相關檔案 */
#ns_Content .BlogInfoHTML .meMsg_MsgFile { list-style:disc; margin-left:40px; } /* 相關檔案 */
#ns_Content .BlogInfoHTML .meMsg_MsgFromEnd { display:none; } /* 期間 */
#ns_Content .BlogInfoHTML .meMsg_MsgListBlk { display:none; } /* 條列項目 */
#ns_Content .BlogInfoHTML .ImgAlignLeft { margin-right:8px; } /* 圖文間距 */
#ns_Content .BlogInfoHTML .ImgAlignRight { margin-left:8px; } /* 圖文間距 */
#ns_Content .BlogInfoHTML .ImgAlignLeftX { margin-right:8px; } /* 圖文間距 */
#ns_Content .BlogInfoHTML .ImgAlignRightX { margin-left:8px; } /* 圖文間距 */
/* 分頁控制列 */
#divPageCtrl { margin:10px; clear:both; }
#divPageCtrl table { margin-left:auto; margin-right:auto; }
/* 表格格式 */
.MsgRow1 { margin-top:10px; } /* 第一列 */
.MsgRowN { } /* 其他列 */
.MsgRowD0 { } /* 偶數列 */
.MsgRowD1 { } /* 奇數列 */
.MsgCell1 { padding:0px; } /* 最左欄 */
.MsgCellN { padding:0px; } /* 中間欄 */
.MsgCellX { padding:0px; } /* 最右欄 */
.MsgRGap { border:0px; margin-top:20px; margin-bottom:20px; } /* 列與列中間 */
.cssPagePanel { clear:both; } /* 控制面板列 */
.MsgRow1 { margin-top:$BlogInfoMsgRow1$; }
.BlogInfoList { padding-left:$BlogInfoMsgRowLR$; padding-right:$BlogInfoMsgRowLR$; }
.MsgRGap { margin-top:$BlogInfoMsgRGapN$; margin-bottom:$BlogInfoMsgRGapN$; }
.MsgCell1 { padding-right:$BlogInfoMsgCGapN$; }
.MsgCellN { padding-left:$BlogInfoMsgCGapN$; padding-right:$BlogInfoMsgCGapN$; }
.MsgCellX { padding-left:$BlogInfoMsgCGapN$; }
.MsgRGap { border-top:$BlogInfoRS$; }
.MsgCellN { border-left:$BlogInfoCS$; }
.MsgCellX { border-left:$BlogInfoCS$; }
.MsgRowD1 { background:$BlogInfoMsgRowD1$; }
.MsgRowD0 { background:$BlogInfoMsgRowD0$; }
.BlogInfoD_1 { background:$BlogInfoD1$; }
.BlogInfoD_0 { background:$BlogInfoD0$; }
.BlogInfoD_0 { border:$BlogInfoB$; }
.BlogInfoD_1 { border:$BlogInfoB$; }
.BlogInfoD_0 , .BlogInfoD_1 { background-image:$BlogInfoBgImg$; background-position:$pos$; background-repeat:$repeat$; }
.BlogInfoHTML { width:$BlogInfoHTMLWidth$; }
.BlogInfoHTML { margin-top:$BlogInfoHTMLTop$; }
.BlogInfoHTML .meMsg_MsgContentBlk.center { padding:$BlogInfoCntVGap$; margin-right:$BlogInfoCntVGap$; }
.BlogInfoHTML .meMsg_MsgContentBlk.left { padding:$BlogInfoCntVGap$; margin-right:$BlogInfoCntVGap$; }
.BlogInfoHTML .meMsg_MsgContentBlk.right { padding:$BlogInfoCntVGap$; margin-left:$BlogInfoCntVGap$; }
.BlogInfoHTML .meMsg_MsgContentBlk.center, .BlogInfoHTML .meMsg_MsgContentBlk.left, .BlogInfoHTML .meMsg_MsgContentBlk.right { border:$BlogInfoCntVB$; }
#ns_Content .meMsg_MsgTitle { font-family:$BlogInfoTextFont$; color:$color$; font-size:$size$; font-style:$style$; font-weight:$weight$; }
#ns_Content .meMsg_Content { font-family:$BlogInfoHTMLFont$; color:$color$; font-size:$size$; font-style:$style$; font-weight:$weight$; }
#ns_Content .meMsg_MsgURL { margin-left:$padding$; color:$color$; font-size:$size$; list-style:$BlogInfoFileSpot$ $pos$ $img$; }
#ns_Content .meMsg_MsgFile { margin-left:$padding$; color:$color$; font-size:$size$; list-style:$BlogInfoFileSpot$ $pos$ $img$; }
#ns_Content .meMsg_MsgURL a { font-family:$BlogInfoFileFont$; color:$color$; font-size:$size$; font-style:$style$; font-weight:$weight$; }
#ns_Content .meMsg_MsgFile a { font-family:$BlogInfoFileFont$; color:$color$; font-size:$size$; font-style:$style$; font-weight:$weight$; }
.BlogInfoHTML .BlogInfo1 { border-bottom:$BlogInfoB1$; }
#ns_Content .meMsg_MsgBlk .meMsg_MsgTitle { border-bottom:$BlogInfoTextHTMLS$; display:block; }
.BlogInfoAuthor { display:$BlogInfoAuthor$; }
.BlogInfoClass { display:$BlogInfoClass$; }
.BlogInfoStatus { display:$BlogInfoStatus$; }
如何在 NAT 主機設定 iptables 導向內網主機。設定方式一:在 NAT 主機設定將 80,443 port 導向內網主機 IP 10.1.1.130 [code] iptables -I FORWARD 1 -j ACCEPT iptables -t nat -I PREROUTING 1 -p tcp --dport 80 -j DNAT --to-destination 10.1.1.130:80 iptables -t nat -I PREROUTING 1 -p tcp --dport 443 -j DNAT --to-destination 10.1.1.130:443 [/code] 注意,假設 NAT 主機的內網 IP 為 10.1.1.2 則 .130 主機的 default gateway 必須指向為 .2 的 NAT 主機。
在 .130 設定 default gateway IP 10.1.1.2 [code] route add default gw 10.1.1.2 [/code]
說明: [ol] [*]這個方式在 .130 的 httpd log 記錄的 remote ip 為 client 端的實際 IP,在 PHP 可以使用 $_SERVER["HTTP_X_FORWARDED_FOR"] 取得。 [*]如果要封鎖某個 client IP 可以直接在 .130 下 iptables DROP 指令封鎖。 [code] iptables -I INPUT 1 -j DROP -s xxx.xxx.xxx.xxx/32 或 ipset add DropIP xxx.xxx.xxx.xxx ipset add DropNet xxx.xxx.xxx.xxx/24 [/code] [*]因為主機 .130 將 default gateway 指向 .2 會導致 .130 對外讀取所有 http,https 的連線都會導向回自己 .130。 [/ol]
設定方式二:在 NAT 主機設定將 80,443 port 導向內網主機 IP 10.1.1.130 [code] iptables -I FORWARD 1 -j ACCEPT iptables -t nat -I PREROUTING 1 -p tcp --dport 80 -j DNAT --to-destination 10.1.1.130:80 iptables -t nat -I PREROUTING 1 -p tcp --dport 443 -j DNAT --to-destination 10.1.1.130:443 iptables -t nat -I POSTROUTING 1 -p tcp -d 10.1.1.130 --dport 80 -j SNAT --to-source 10.1.1.2 iptables -t nat -I POSTROUTING 1 -p tcp -d 10.1.1.130 --dport 443 -j SNAT --to-source 10.1.1.2 [/code] 說明,這個方式加上 POSTROUTING 會改寫封包,因此 .130 的 default gateway 不必指向為 .2 的 NAT 主機,甚至沒有設定 default gateway 也沒有關係。
注意: [ol] [*]這個方式在 .130 的 httpd log 記錄的 remote ip 為 NAT 的內網 IP 10.1.1.2 無法得知 client 端的實際 IP。 [*]因為 .130 無法得知 client 端 IP,所以無法在 .130 封鎖惡意的 client IP,必須在 .2 才能封鎖。 [/ol]
|
1925如何在 NAT 主機設定 iptables 導向內網主機。2023-10-2111:49:201aWayMsgArticle---
ZC1072
ZC1072
1
1
總覽
0
339
aWay
0
0
/main/wdb2/images/1x1.gif
|
| |
| | |
|
|
| |