iptables DNAT port mapping test

| | Comments (0)

環境: 內部的一台機器 listen tcp port 135,139 供測試
測試工具: nmap, 設好 rule 後作多次 port scan 動作, 觀查 open port

135-139 對 135-139 (一對一 mapping)
結果: port 135,139 open

235-239 對 135-139 (一對一 shift mapping)
結果: 動態 port 對應
(在 235-239 中動態分配 2 個 port 分別 mapping 到 135,139)

100-150 對 135-139 (多對少 mapping, --dport 在 listen port 範圍內)
結果: 動態 port 對應, 135 對 135, 139 對 139 的機率很高

150-200 對 135-139 (多對少 mapping, --dport 不在 listen port 範圍內)
結果: 動態 port 對應

130-140 對 120-150 (少對多 mapping, --dport 在 listen port 範圍內)
結果: 固定 135,139 open

140-150 對 120-140 (少對多 mapping, --dport 不在 listen port 範圍內)
結果: 動態 port 對應
有掃到 0 個 port, 1 個 port , 2 個 port 均有出現
因為 10 個 port 無法一一 mapping 到 20 個 port

結論: 當 port 無法直接 mapping 時, 會動態 mapping

Leave a comment

March 2009

Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        

About this Entry

This page contains a single entry by Pank published on December 8, 2004 9:03 PM.

MSN's Ad Server was the previous entry in this blog.

Some useful variables in BASH is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.