亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊(cè) 查看新帖 |

Chinaunix

  平臺(tái) 論壇 博客 文庫(kù)
最近訪問(wèn)板塊 發(fā)新帖
查看: 3111 | 回復(fù): 6
打印 上一主題 下一主題

[系統(tǒng)安全] iptables無(wú)法過(guò)濾 [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2014-10-23 17:17 |只看該作者 |倒序?yàn)g覽
以下規(guī)則是openWrt(也是linux)默認(rèn)規(guī)則,

配置大概是這樣:這是一個(gè)寬帶路由器(NAT設(shè)備),WAN網(wǎng)口使用DHCP獲取ip,LAN口也作為DHCP服務(wù)器。配置了SNAT(MASQUERADE)。正常情況下,通過(guò)WAN口上行的數(shù)據(jù)的源ip被改成路由器WAN口ip,下行數(shù)據(jù)通過(guò)connect track自動(dòng)把目的地址替換成內(nèi)網(wǎng)IP。


那么,問(wèn)題來(lái)了,(假設(shè)內(nèi)網(wǎng)某主機(jī)ip是192.168.1.128,測(cè)試過(guò)程中這臺(tái)主機(jī)不間斷高速下載)
現(xiàn)象是:
1、通過(guò)SNAT上網(wǎng)正常
2、通過(guò) iptables -I FORWARD -d 192.168.1.128 -j DROP  想達(dá)到禁止下載,不生效,電腦正常下載
3、針對(duì)2的現(xiàn)象作調(diào)試:通過(guò)iptables -L FORWARD -nv查看統(tǒng)計(jì),發(fā)現(xiàn)filter表FORWARD鏈無(wú)明顯的大流量通過(guò)
4、針對(duì)2的現(xiàn)象作調(diào)試, 通過(guò)iptables -t mangle -L FORWARD -nv查看統(tǒng)計(jì),發(fā)現(xiàn)mangle表FORWARD有明顯流量通過(guò),目測(cè)接近下載速度。
5、通過(guò) iptables -I FORWARD -s 192.168.1.128 -j DROP,生效,電腦不能下載(因?yàn)檫B接是雙向的)



個(gè)人理解:根據(jù)iptables處理順序,在FORWARD中,先執(zhí)行mangle表、再執(zhí)行filter表,除非mangle處理結(jié)果為DROP,否則數(shù)據(jù)將無(wú)條件經(jīng)過(guò)filter


問(wèn):為什么下載時(shí)數(shù)據(jù)不經(jīng)過(guò)FORWARD鏈的filter表?






以下是iptables 規(guī)則




  1. root@OpenWrt:~#iptables -L
  2. Chain INPUT (policy ACCEPT)
  3. target     prot opt source               destination         
  4. delegate_input  all  --  anywhere             anywhere            

  5. Chain FORWARD (policy DROP)
  6. target     prot opt source               destination         
  7. DROP       all  --  anywhere             PC201409180946.lan  
  8. p2pblock   udp  --  anywhere             anywhere             udp spts:1024:65535 dpts:1024:65535
  9. p2pblock   tcp  --  anywhere             anywhere             tcp spts:1024:65535 dpts:1024:65535
  10. delegate_forward  all  --  anywhere             anywhere            

  11. Chain OUTPUT (policy ACCEPT)
  12. target     prot opt source               destination         
  13. DROP       all  --  192.168.1.90         anywhere            
  14. delegate_output  all  --  anywhere             anywhere            

  15. Chain BCP38 (3 references)
  16. target     prot opt source               destination         
  17. RETURN     udp  --  anywhere             anywhere             udp spts:bootps:bootpc dpts:bootps:bootpc
  18. REJECT     all  --  anywhere             anywhere             match-set bcp38-ipv4 dst reject-with icmp-net-unreachable
  19. DROP       all  --  anywhere             anywhere             match-set bcp38-ipv4 src

  20. Chain MINIUPNPD (1 references)
  21. target     prot opt source               destination         
  22. ACCEPT     tcp  --  anywhere             192.168.1.22         tcp dpt:10946
  23. ACCEPT     udp  --  anywhere             192.168.1.22         udp dpt:10489
  24. ACCEPT     tcp  --  anywhere             PC201409180946.lan   tcp dpt:10946
  25. ACCEPT     udp  --  anywhere             PC201409180946.lan   udp dpt:10489

  26. Chain delegate_forward (1 references)
  27. target     prot opt source               destination         
  28. forwarding_rule  all  --  anywhere             anywhere             /* user chain for forwarding */
  29. ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED
  30. ACCEPT     all  --  anywhere             192.168.1.22         /* ddrop */
  31. zone_lan_forward  all  --  anywhere             anywhere            
  32. zone_wan_forward  all  --  anywhere             anywhere            
  33. reject     all  --  anywhere             anywhere            

  34. Chain delegate_input (1 references)
  35. target     prot opt source               destination         
  36. ACCEPT     all  --  anywhere             anywhere            
  37. input_rule  all  --  anywhere             anywhere             /* user chain for input */
  38. ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED
  39. syn_flood  tcp  --  anywhere             anywhere             tcp flags:FIN,SYN,RST,ACK/SYN
  40. zone_lan_input  all  --  anywhere             anywhere            
  41. zone_wan_input  all  --  anywhere             anywhere            

  42. Chain delegate_output (1 references)
  43. target     prot opt source               destination         
  44. ACCEPT     all  --  anywhere             anywhere            
  45. output_rule  all  --  anywhere             anywhere             /* user chain for output */
  46. ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED
  47. zone_lan_output  all  --  anywhere             anywhere            
  48. zone_wan_output  all  --  anywhere             anywhere            

  49. Chain forwarding_lan_rule (1 references)
  50. target     prot opt source               destination         

  51. Chain forwarding_rule (1 references)
  52. target     prot opt source               destination         
  53. BCP38      all  --  anywhere             anywhere            

  54. Chain forwarding_wan_rule (1 references)
  55. target     prot opt source               destination         

  56. Chain input_lan_rule (1 references)
  57. target     prot opt source               destination         

  58. Chain input_rule (1 references)
  59. target     prot opt source               destination         
  60. BCP38      all  --  anywhere             anywhere            

  61. Chain input_wan_rule (1 references)
  62. target     prot opt source               destination         

  63. Chain luci_splash_filter (1 references)
  64. target     prot opt source               destination         
  65. REJECT     tcp  --  anywhere             anywhere             reject-with tcp-reset
  66. REJECT     all  --  anywhere             anywhere             reject-with icmp-net-prohibited

  67. Chain luci_splash_forwarding (0 references)
  68. target     prot opt source               destination         
  69. RETURN     all  --  anywhere             lvps176-28-11-93.dedicated.hosteurope.de
  70. luci_splash_filter  all  --  anywhere             anywhere            

  71. Chain output_lan_rule (1 references)
  72. target     prot opt source               destination         

  73. Chain output_rule (1 references)
  74. target     prot opt source               destination         
  75. BCP38      all  --  anywhere             anywhere            

  76. Chain output_wan_rule (1 references)
  77. target     prot opt source               destination         

  78. Chain p2pblock (2 references)
  79. target     prot opt source               destination         
  80. LOG        all  --  anywhere             anywhere             -m ipp2p  --apple  limit: avg 1/min burst 5 LOG level warning prefix "P2PBLOCK-seen-apple:"
  81.            all  --  anywhere             anywhere             -m ipp2p  --apple  recent: SET name: P2PBLOCK side: dest mask: 255.255.255.255
  82. LOG        all  --  anywhere             anywhere             -m ipp2p  --winmx  limit: avg 1/min burst 5 LOG level warning prefix "P2PBLOCK-seen-winmx:"
  83.            all  --  anywhere             anywhere             -m ipp2p  --winmx  recent: SET name: P2PBLOCK side: dest mask: 255.255.255.255
  84. LOG        all  --  anywhere             anywhere             -m ipp2p  --soul  limit: avg 1/min burst 5 LOG level warning prefix "P2PBLOCK-seen-soul:"
  85.            all  --  anywhere             anywhere             -m ipp2p  --soul  recent: SET name: P2PBLOCK side: dest mask: 255.255.255.255
  86. LOG        all  --  anywhere             anywhere             -m ipp2p  --ares  limit: avg 1/min burst 5 LOG level warning prefix "P2PBLOCK-seen-ares:"
  87.            all  --  anywhere             anywhere             -m ipp2p  --ares  recent: SET name: P2PBLOCK side: dest mask: 255.255.255.255
  88. LOG        all  --  anywhere             anywhere             -m ipp2p  --bit  limit: avg 1/min burst 5 LOG level warning prefix "P2PBLOCK-seen-bit:"
  89.            all  --  anywhere             anywhere             -m ipp2p  --bit  recent: SET name: P2PBLOCK side: dest mask: 255.255.255.255
  90. LOG        all  --  anywhere             anywhere             -m ipp2p  --gnu  limit: avg 1/min burst 5 LOG level warning prefix "P2PBLOCK-seen-gnu:"
  91.            all  --  anywhere             anywhere             -m ipp2p  --gnu  recent: SET name: P2PBLOCK side: dest mask: 255.255.255.255
  92. LOG        all  --  anywhere             anywhere             -m ipp2p  --kazaa  limit: avg 1/min burst 5 LOG level warning prefix "P2PBLOCK-seen-kazaa:"
  93.            all  --  anywhere             anywhere             -m ipp2p  --kazaa  recent: SET name: P2PBLOCK side: dest mask: 255.255.255.255
  94. LOG        all  --  anywhere             anywhere             -m ipp2p  --dc  limit: avg 1/min burst 5 LOG level warning prefix "P2PBLOCK-seen-dc:"
  95.            all  --  anywhere             anywhere             -m ipp2p  --dc  recent: SET name: P2PBLOCK side: dest mask: 255.255.255.255
  96. LOG        all  --  anywhere             anywhere             -m ipp2p  --edk  limit: avg 1/min burst 5 LOG level warning prefix "P2PBLOCK-seen-edk:"
  97.            all  --  anywhere             anywhere             -m ipp2p  --edk  recent: SET name: P2PBLOCK side: dest mask: 255.255.255.255
  98. LOG        all  --  anywhere             anywhere             recent: CHECK seconds: 60 hit_count: 3 name: P2PBLOCK side: dest mask: 255.255.255.255 limit: avg 1/min burst 5 LOG level warning prefix "P2PBLOCK-DROP:"
  99. DROP       all  --  anywhere             anywhere             recent: CHECK seconds: 60 hit_count: 3 name: P2PBLOCK side: dest mask: 255.255.255.255

  100. Chain reject (3 references)
  101. target     prot opt source               destination         
  102. REJECT     tcp  --  anywhere             anywhere             reject-with tcp-reset
  103. REJECT     all  --  anywhere             anywhere             reject-with icmp-port-unreachable

  104. Chain syn_flood (1 references)
  105. target     prot opt source               destination         
  106. RETURN     tcp  --  anywhere             anywhere             tcp flags:FIN,SYN,RST,ACK/SYN limit: avg 25/sec burst 50
  107. DROP       all  --  anywhere             anywhere            

  108. Chain zone_lan_dest_ACCEPT (2 references)
  109. target     prot opt source               destination         
  110. ACCEPT     all  --  anywhere             anywhere            

  111. Chain zone_lan_forward (1 references)
  112. target     prot opt source               destination         
  113. forwarding_lan_rule  all  --  anywhere             anywhere             /* user chain for forwarding */
  114. zone_wan_dest_ACCEPT  all  --  anywhere             anywhere             /* forwarding lan -> wan */
  115. ACCEPT     all  --  anywhere             anywhere             ctstate DNAT /* Accept port forwards */
  116. zone_lan_dest_ACCEPT  all  --  anywhere             anywhere            

  117. Chain zone_lan_input (1 references)
  118. target     prot opt source               destination         
  119. input_lan_rule  all  --  anywhere             anywhere             /* user chain for input */
  120. ACCEPT     all  --  anywhere             anywhere             ctstate DNAT /* Accept port redirections */
  121. zone_lan_src_ACCEPT  all  --  anywhere             anywhere            

  122. Chain zone_lan_output (1 references)
  123. target     prot opt source               destination         
  124. output_lan_rule  all  --  anywhere             anywhere             /* user chain for output */
  125. zone_lan_dest_ACCEPT  all  --  anywhere             anywhere            

  126. Chain zone_lan_src_ACCEPT (1 references)
  127. target     prot opt source               destination         
  128. ACCEPT     all  --  anywhere             anywhere            

  129. Chain zone_wan_dest_ACCEPT (2 references)
  130. target     prot opt source               destination         
  131. ACCEPT     all  --  anywhere             anywhere            

  132. Chain zone_wan_dest_REJECT (1 references)
  133. target     prot opt source               destination         
  134. reject     all  --  anywhere             anywhere            

  135. Chain zone_wan_forward (1 references)
  136. target     prot opt source               destination         
  137. MINIUPNPD  all  --  anywhere             anywhere            
  138. forwarding_wan_rule  all  --  anywhere             anywhere             /* user chain for forwarding */
  139. ACCEPT     all  --  anywhere             anywhere             ctstate DNAT /* Accept port forwards */
  140. zone_wan_dest_REJECT  all  --  anywhere             anywhere            

  141. Chain zone_wan_input (1 references)
  142. target     prot opt source               destination         
  143. input_wan_rule  all  --  anywhere             anywhere             /* user chain for input */
  144. ACCEPT     udp  --  anywhere             anywhere             udp dpt:bootpc /* Allow-DHCP-Renew */
  145. ACCEPT     icmp --  anywhere             anywhere             icmp echo-request /* Allow-Ping */
  146. ACCEPT     all  --  anywhere             anywhere             ctstate DNAT /* Accept port redirections */
  147. zone_wan_src_REJECT  all  --  anywhere             anywhere            

  148. Chain zone_wan_output (1 references)
  149. target     prot opt source               destination         
  150. output_wan_rule  all  --  anywhere             anywhere             /* user chain for output */
  151. zone_wan_dest_ACCEPT  all  --  anywhere             anywhere            

  152. Chain zone_wan_src_REJECT (1 references)
  153. target     prot opt source               destination         
  154. reject     all  --  anywhere             anywhere            
  155. root@OpenWrt:~#
  156. root@OpenWrt:~#
  157. root@OpenWrt:~#
  158. root@OpenWrt:~#
  159. root@OpenWrt:~#
  160. root@OpenWrt:~#
  161. root@OpenWrt:~#
  162. root@OpenWrt:~#
  163. root@OpenWrt:~#
  164. root@OpenWrt:~#
  165. root@OpenWrt:~#
  166. root@OpenWrt:~#
  167. root@OpenWrt:~#
  168. root@OpenWrt:~#
  169. root@OpenWrt:~#
  170. root@OpenWrt:~#
  171. root@OpenWrt:~#
  172. root@OpenWrt:~#
  173. root@OpenWrt:~#
  174. root@OpenWrt:~#
  175. root@OpenWrt:~#
  176. root@OpenWrt:~#
  177. root@OpenWrt:~#
  178. root@OpenWrt:~#
  179. root@OpenWrt:~#
  180. root@OpenWrt:~#
  181. root@OpenWrt:~#
  182. root@OpenWrt:~#iptables -t mangle -L
  183. Chain PREROUTING (policy ACCEPT)
  184. target     prot opt source               destination         
  185. luci_splash_mark_out  all  --  anywhere             anywhere            
  186. mwan3_hook  all  --  anywhere             anywhere            
  187. fwmark     all  --  anywhere             anywhere            

  188. Chain INPUT (policy ACCEPT)
  189. target     prot opt source               destination         

  190. Chain FORWARD (policy ACCEPT)
  191. target     prot opt source               destination         
  192. mssfix     all  --  anywhere             anywhere            

  193. Chain OUTPUT (policy ACCEPT)
  194. target     prot opt source               destination         
  195. mwan3_hook  all  --  anywhere             anywhere            
  196. mwan3_output_hook  all  --  anywhere             anywhere            

  197. Chain POSTROUTING (policy ACCEPT)
  198. target     prot opt source               destination         
  199. luci_splash_mark_in  all  --  anywhere             anywhere            

  200. Chain fwmark (1 references)
  201. target     prot opt source               destination         

  202. Chain luci_splash_mark_in (1 references)
  203. target     prot opt source               destination         

  204. Chain luci_splash_mark_out (1 references)
  205. target     prot opt source               destination         

  206. Chain mssfix (1 references)
  207. target     prot opt source               destination         
  208. TCPMSS     tcp  --  anywhere             anywhere             tcp flags:SYN,RST/SYN /* wan (mtu_fix) */ TCPMSS clamp to PMTU

  209. Chain mwan3_connected (2 references)
  210. target     prot opt source               destination         
  211. MARK       all  --  anywhere             127.0.0.0/8          MARK or 0xff00
  212. MARK       all  --  anywhere             base-address.mcast.net/3  MARK or 0xff00
  213. MARK       all  --  anywhere             10.20.12.0/24        MARK or 0xff00
  214. MARK       all  --  anywhere             192.168.1.0/24       MARK or 0xff00

  215. Chain mwan3_hook (2 references)
  216. target     prot opt source               destination         
  217. CONNMARK   all  --  anywhere             anywhere             CONNMARK restore mask 0xff00
  218. mwan3_ifaces  all  --  anywhere             anywhere             mark match 0x0/0xff00
  219. mwan3_connected  all  --  anywhere             anywhere             mark match 0x0/0xff00
  220. mwan3_rules  all  --  anywhere             anywhere             mark match 0x0/0xff00
  221. CONNMARK   all  --  anywhere             anywhere             CONNMARK save mask 0xff00
  222. mwan3_connected  all  --  anywhere             anywhere             mark match ! 0xff00/0xff00

  223. Chain mwan3_iface_wan (1 references)
  224. target     prot opt source               destination         
  225. MARK       all  --  10.20.12.0/24        anywhere             mark match 0x0/0xff00 /* default */ MARK or 0xff00
  226. MARK       all  --  anywhere             anywhere             mark match 0x0/0xff00 /* wan */ MARK xset 0x100/0xff00

  227. Chain mwan3_ifaces (1 references)
  228. target     prot opt source               destination         
  229. mwan3_iface_wan  all  --  anywhere             anywhere             mark match 0x0/0xff00

  230. Chain mwan3_output_hook (1 references)
  231. target     prot opt source               destination         
  232. mwan3_track_wan  icmp --  anywhere             anywhere             icmp echo-request length 32

  233. Chain mwan3_policy_balanced (1 references)
  234. target     prot opt source               destination         
  235. MARK       all  --  anywhere             anywhere             mark match 0x0/0xff00 /* wan 3 3 */ MARK xset 0x100/0xff00

  236. Chain mwan3_policy_wan2_only (0 references)
  237. target     prot opt source               destination         
  238. MARK       all  --  anywhere             anywhere             mark match 0x0/0xff00 /* unreachable */ MARK xset 0xfe00/0xff00

  239. Chain mwan3_policy_wan2_wan (1 references)
  240. target     prot opt source               destination         
  241. MARK       all  --  anywhere             anywhere             mark match 0x0/0xff00 /* wan 3 3 */ MARK xset 0x100/0xff00

  242. Chain mwan3_policy_wan_only (0 references)
  243. target     prot opt source               destination         
  244. MARK       all  --  anywhere             anywhere             mark match 0x0/0xff00 /* wan 3 3 */ MARK xset 0x100/0xff00

  245. Chain mwan3_policy_wan_wan2 (1 references)
  246. target     prot opt source               destination         
  247. MARK       all  --  anywhere             anywhere             mark match 0x0/0xff00 /* wan 3 3 */ MARK xset 0x100/0xff00

  248. Chain mwan3_rules (1 references)
  249. target     prot opt source               destination         
  250. mwan3_policy_wan_wan2  tcp  --  0.0.0.0/0.0.0.1      anywhere             multiport sports 0:65535 multiport dports https mark match 0x0/0xff00 /* sticky_even */
  251. mwan3_policy_wan2_wan  tcp  --  0.0.0.1/0.0.0.1      anywhere             multiport sports 0:65535 multiport dports https mark match 0x0/0xff00 /* sticky_odd */
  252. mwan3_policy_balanced  all  --  anywhere             anywhere             mark match 0x0/0xff00 /* default_rule */

  253. Chain mwan3_track_wan (1 references)
  254. target     prot opt source               destination         
  255. MARK       all  --  anywhere             resolver2.opendns.com  MARK or 0xff00
  256. MARK       all  --  anywhere             resolver1.opendns.com  MARK or 0xff00
  257. MARK       all  --  anywhere             google-public-dns-a.google.com  MARK or 0xff00
  258. MARK       all  --  anywhere             google-public-dns-b.google.com  MARK or 0xff00

  259. Chain qos_Default (0 references)
  260. target     prot opt source               destination         
  261. CONNMARK   all  --  anywhere             anywhere             CONNMARK restore mask 0xf
  262. qos_Default_ct  all  --  anywhere             anywhere             mark match 0x0/0xf
  263. MARK       udp  --  anywhere             anywhere             mark match 0x0/0xf0 length 0:500 MARK xset 0x22/0xff
  264. MARK       icmp --  anywhere             anywhere             MARK xset 0x11/0xff
  265. MARK       tcp  --  anywhere             anywhere             mark match 0x0/0xf0 tcp spts:1024:65535 dpts:1024:65535 MARK xset 0x44/0xff
  266. MARK       udp  --  anywhere             anywhere             mark match 0x0/0xf0 udp spts:1024:65535 dpts:1024:65535 MARK xset 0x44/0xff
  267. CONNMARK   all  --  anywhere             anywhere             CONNMARK save mask 0xf0

  268. Chain qos_Default_ct (1 references)
  269. target     prot opt source               destination         
  270. MARK       tcp  --  anywhere             anywhere             mark match 0x0/0xf tcp multiport ports ssh,domain /* ssh, dns */ MARK xset 0x11/0xff
  271. MARK       udp  --  anywhere             anywhere             mark match 0x0/0xf udp multiport ports ssh,domain /* ssh, dns */ MARK xset 0x11/0xff
  272. MARK       tcp  --  anywhere             anywhere             mark match 0x0/0xf tcp multiport ports ftp-data,ftp,smtp,www,pop3,https,imaps,pop3s /* ftp, smtp, http(s), imap */ MARK xset 0x33/0xff
  273. MARK       tcp  --  anywhere             anywhere             mark match 0x0/0xf tcp multiport ports 5190 /* AOL, iChat, ICQ */ MARK xset 0x22/0xff
  274. MARK       udp  --  anywhere             anywhere             mark match 0x0/0xf udp multiport ports 5190 /* AOL, iChat, ICQ */ MARK xset 0x22/0xff
  275. CONNMARK   all  --  anywhere             anywhere             CONNMARK save mask 0xff
  276. MARK       tcp  --  anywhere             anywhere             mark match 0x0/0xf tcp multiport ports ssh,domain /* ssh, dns */ MARK xset 0x11/0xff
  277. MARK       udp  --  anywhere             anywhere             mark match 0x0/0xf udp multiport ports ssh,domain /* ssh, dns */ MARK xset 0x11/0xff
  278. MARK       tcp  --  anywhere             anywhere             mark match 0x0/0xf tcp multiport ports ftp-data,ftp,smtp,www,pop3,https,imaps,pop3s /* ftp, smtp, http(s), imap */ MARK xset 0x33/0xff
  279. MARK       tcp  --  anywhere             anywhere             mark match 0x0/0xf tcp multiport ports 5190 /* AOL, iChat, ICQ */ MARK xset 0x22/0xff
  280. MARK       udp  --  anywhere             anywhere             mark match 0x0/0xf udp multiport ports 5190 /* AOL, iChat, ICQ */ MARK xset 0x22/0xff
  281. root@OpenWrt:~#
  282. root@OpenWrt:~#
  283. root@OpenWrt:~#
  284. root@OpenWrt:~#
  285. root@OpenWrt:~#
  286. root@OpenWrt:~#
  287. root@OpenWrt:~#
  288. root@OpenWrt:~#
  289. root@OpenWrt:~#
  290. root@OpenWrt:~#iptables -t nat -L
  291. Chain PREROUTING (policy ACCEPT)
  292. target     prot opt source               destination         
  293. DNAT       all  --  anywhere             10.20.12.13          to:192.168.1.22
  294. DNAT       tcp  --  anywhere             10.20.12.13          tcp dpt:8022 to:192.168.1.130:22
  295. delegate_prerouting  all  --  anywhere             anywhere            

  296. Chain INPUT (policy ACCEPT)
  297. target     prot opt source               destination         

  298. Chain OUTPUT (policy ACCEPT)
  299. target     prot opt source               destination         

  300. Chain POSTROUTING (policy ACCEPT)
  301. target     prot opt source               destination         
  302. delegate_postrouting  all  --  anywhere             anywhere            

  303. Chain MINIUPNPD (1 references)
  304. target     prot opt source               destination         
  305. DNAT       tcp  --  anywhere             anywhere             tcp dpt:10946 to:192.168.1.22:10946
  306. DNAT       udp  --  anywhere             anywhere             udp dpt:10946 to:192.168.1.22:10489
  307. DNAT       tcp  --  anywhere             anywhere             tcp dpt:17083 to:192.168.1.128:10946
  308. DNAT       udp  --  anywhere             anywhere             udp dpt:17083 to:192.168.1.128:10489

  309. Chain delegate_postrouting (1 references)
  310. target     prot opt source               destination         
  311. postrouting_rule  all  --  anywhere             anywhere             /* user chain for postrouting */
  312. zone_lan_postrouting  all  --  anywhere             anywhere            
  313. zone_wan_postrouting  all  --  anywhere             anywhere            

  314. Chain delegate_prerouting (1 references)
  315. target     prot opt source               destination         
  316. prerouting_rule  all  --  anywhere             anywhere             /* user chain for prerouting */
  317. zone_lan_prerouting  all  --  anywhere             anywhere            
  318. zone_wan_prerouting  all  --  anywhere             anywhere            

  319. Chain luci_splash_leases (1 references)
  320. target     prot opt source               destination         
  321. REDIRECT   udp  --  anywhere             anywhere             udp dpt:domain redir ports 53
  322. REDIRECT   tcp  --  anywhere             anywhere             tcp dpt:www redir ports 8082

  323. Chain luci_splash_prerouting (0 references)
  324. target     prot opt source               destination         
  325. RETURN     all  --  anywhere             lvps176-28-11-93.dedicated.hosteurope.de
  326. luci_splash_leases  all  --  anywhere             anywhere            

  327. Chain postrouting_lan_rule (1 references)
  328. target     prot opt source               destination         

  329. Chain postrouting_rule (1 references)
  330. target     prot opt source               destination         

  331. Chain postrouting_wan_rule (1 references)
  332. target     prot opt source               destination         

  333. Chain prerouting_lan_rule (1 references)
  334. target     prot opt source               destination         

  335. Chain prerouting_rule (1 references)
  336. target     prot opt source               destination         

  337. Chain prerouting_wan_rule (1 references)
  338. target     prot opt source               destination         

  339. Chain zone_lan_postrouting (1 references)
  340. target     prot opt source               destination         
  341. postrouting_lan_rule  all  --  anywhere             anywhere             /* user chain for postrouting */

  342. Chain zone_lan_prerouting (1 references)
  343. target     prot opt source               destination         
  344. prerouting_lan_rule  all  --  anywhere             anywhere             /* user chain for prerouting */

  345. Chain zone_wan_postrouting (1 references)
  346. target     prot opt source               destination         
  347. postrouting_wan_rule  all  --  anywhere             anywhere             /* user chain for postrouting */
  348. MASQUERADE  all  --  anywhere             anywhere            

  349. Chain zone_wan_prerouting (1 references)
  350. target     prot opt source               destination         
  351. MINIUPNPD  all  --  anywhere             anywhere            
  352. prerouting_wan_rule  all  --  anywhere             anywhere             /* user chain for prerouting */
  353. root@OpenWrt:~#
復(fù)制代碼

論壇徽章:
0
2 [報(bào)告]
發(fā)表于 2014-10-23 20:52 |只看該作者
可能和那幾條miniupnpd的規(guī)則有關(guān)

論壇徽章:
32
處女座
日期:2013-11-20 23:41:20雙子座
日期:2014-06-11 17:20:43戌狗
日期:2014-06-16 11:05:00處女座
日期:2014-07-22 17:30:47獅子座
日期:2014-07-28 15:38:17金牛座
日期:2014-08-05 16:34:01亥豬
日期:2014-08-18 13:34:25白羊座
日期:2014-09-02 15:03:55金牛座
日期:2014-11-10 10:23:58處女座
日期:2014-12-02 09:17:52程序設(shè)計(jì)版塊每日發(fā)帖之星
日期:2015-06-16 22:20:002015亞冠之塔什干火車頭
日期:2015-06-20 23:28:22
3 [報(bào)告]
發(fā)表于 2014-10-24 13:43 |只看該作者
好復(fù)雜的iptables,看起來(lái)好費(fèi)勁~{:3_201:}

論壇徽章:
0
4 [報(bào)告]
發(fā)表于 2014-10-24 16:25 |只看該作者
回復(fù) 2# pheyx


    謝謝你的回答!MINIUPNPD那些規(guī)則是我自己不知怎么配進(jìn)去的,重啟后沒(méi)了,但上面的一樣存在

論壇徽章:
0
5 [報(bào)告]
發(fā)表于 2014-10-24 16:30 |只看該作者
回復(fù) 3# yestreenstars


    可以這么看:其實(shí)就是3個(gè)表:filter(默認(rèn))、mangle、nat,我以大量換行分開(kāi)了,然后是5個(gè)基本鏈,PREROUTING、INPUT、FORWARD、OUTPUT、POSTROUTING,后面亂七八糟的是自定義鏈,自定義鏈通過(guò)上面5條基本鏈跳轉(zhuǎn)過(guò)去,比如說(shuō):INPUT的某條規(guī)則的target是MINIUPNPD,那么就跳到MINIUPNPD鏈執(zhí)行規(guī)則,像函數(shù)調(diào)用一樣

論壇徽章:
0
6 [報(bào)告]
發(fā)表于 2014-10-27 18:35 |只看該作者
回復(fù) 3# yestreenstars


    問(wèn)題已解決,如果有興趣可以看我的博客。



http://blog.chinaunix.net/uid-29690780-id-4578554.html

論壇徽章:
32
處女座
日期:2013-11-20 23:41:20雙子座
日期:2014-06-11 17:20:43戌狗
日期:2014-06-16 11:05:00處女座
日期:2014-07-22 17:30:47獅子座
日期:2014-07-28 15:38:17金牛座
日期:2014-08-05 16:34:01亥豬
日期:2014-08-18 13:34:25白羊座
日期:2014-09-02 15:03:55金牛座
日期:2014-11-10 10:23:58處女座
日期:2014-12-02 09:17:52程序設(shè)計(jì)版塊每日發(fā)帖之星
日期:2015-06-16 22:20:002015亞冠之塔什干火車頭
日期:2015-06-20 23:28:22
7 [報(bào)告]
發(fā)表于 2014-10-28 08:59 |只看該作者
回復(fù) 6# 阿鸞44

好的~{:3_193:}
   
您需要登錄后才可以回帖 登錄 | 注冊(cè)

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號(hào)-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號(hào):11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專區(qū)
中國(guó)互聯(lián)網(wǎng)協(xié)會(huì)會(huì)員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過(guò)ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請(qǐng)注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP