{"id":108,"date":"2012-05-02T17:36:52","date_gmt":"2012-05-02T09:36:52","guid":{"rendered":"http:\/\/www.freezhongzi.info\/?p=108"},"modified":"2019-09-29T09:54:19","modified_gmt":"2019-09-29T01:54:19","slug":"%e6%89%93%e9%80%a0openwrt%e7%bd%91%e7%bb%9c%e7%9b%91%e5%90%ac%e5%99%a8","status":"publish","type":"post","link":"https:\/\/bl4kraven.com\/index.php\/2012\/05\/02\/%e6%89%93%e9%80%a0openwrt%e7%bd%91%e7%bb%9c%e7%9b%91%e5%90%ac%e5%99%a8\/","title":{"rendered":"\u6253\u9020OpenWrt\u7f51\u7edc\u76d1\u542c\u5668"},"content":{"rendered":"<h1>\u524d\u8a00<\/h1>\n<p>\u5199\u4e86\u4e0a\u4e00\u7bc7\u540e\u6211\u5076\u7136\u60f3\u5230\u7f51\u6865\u4e5f\u53ef\u4ee5\u7528\u6765\u76d1\u542c\u6570\u636e:)\uff0c\u53ea\u8981\u5728\u76ee\u6807PC\u6216\u8def\u7531\u5668\u51fa\u53e3\u4e0a\u8fde\u63a5\u4e00\u4e2a\u7f51\u6865\uff0c\u76d1\u542c\u7f51\u6865\u7f51\u5361\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n<p><center><img decoding=\"async\" src=\"https:\/\/bl4kraven.com\/pic\/openwrtsniffer_2012-5-2.jpg\" width=\"470\"><\/center><\/p>\n<h1>\u5b9e\u73b0<\/h1>\n<p>\u8bdd\u8bf4\u539f\u7406\u5176\u5b9e\u5f88\u7b80\u5355\u5566\uff0c\u7f51\u6865\u8fde\u63a5\u4e24\u4e2a\u5b50\u7f51\uff0c\u56e0\u4e3a\u662f\u4e8c\u5c42\u8bbe\u5907\u6240\u4ee5\u5bf9\u4e0a\u5c42\u7684TCP\/IP\u662f\u900f\u660e\u7684\uff0c\u800c\u4e14\u6240\u6709\u901a\u4fe1\u90fd\u8981\u7ecf\u8fc7\u7f51\u6865\u4e2d\u8f6c\uff0c\u7528\u666e\u901a\u7684tcpdump\u5c31\u53ef\u4ee5\u76d1\u542c\u4e86\u3002<\/p>\n<p>\u5728OpenWrt\u4e0a\u9700\u8981\u5f00\u542fVLAN\u6765\u6a21\u62df\u4e24\u4e2a\u865a\u62df\u5b50\u7f51vlan0\u548cvlan1<\/p>\n<pre><code>config switch eth1\n        option reset 1\n        option enable_vlan 1\n\nconfig switch_vlan\n        option vlan 0\n        option device eth1\n        option ports '0 1 2 5t'\n\nconfig switch_vlan\n        option vlan 1\n        option device eth1\n        option ports '3 5t'\n<\/code><\/pre>\n<p>\u4e24\u4e2avlan\u7f51\u7edc\u63a5\u53e3\u5206\u522b\u4e3aeth1.0\u548ceth1.1\uff0c0\u30011\u30012\u53e3\u4e3a\u4e00\u4e2a\u5b50\u7f51\uff0c3\u53e3\u5355\u72ec\u4e00\u4e2a\u5b50\u7f51\u3002\u73b0\u5728\u628aeth1.0\u548ceth1.1\u4e24\u4e2a\u7f51\u7edc\u63a5\u53e3\u7ec4\u6210\u4e00\u4e2a\u7f51\u6865br0\uff1a<\/p>\n<pre><code>config interface br0\n        option type bridge\n        option ifname 'eth1.0 eth1.1'\n        option proto none\n<\/code><\/pre>\n<p>br0\u9ed8\u8ba4\u4e0d\u8bbe\u7f6eip\uff0c\u56e0\u4e3a\u6211\u76f4\u63a5\u7528TTL\u7ebf\u83b7\u5f97Shell\u6240\u4ee5\u7528\u4e0d\u7740\u3002\u5982\u679c\u4f60\u60f3\u8fdc\u7a0b\u8bbf\u95eeOpenWrt\uff0c\u5219\u5fc5\u987b\u6309\u60c5\u51b5\u8bbe\u7f6estatic\u6216dhcp\uff0c\u5f53\u7136\u4e5f\u53ef\u4ee5\u7528\u524d\u4e00\u7bc7\u8bf4\u5230\u5e95Wifi\u5ba2\u6237\u7aef\uff0c\u8fd9\u6837\u4f60\u5c31\u53ef\u4ee5\u8212\u8212\u670d\u670d\u7684\u5750\u5728\u7535\u8111\u8fb9\u8fdc\u7a0b\u767b\u5f55\u67e5\u770b\u6293\u5305\u4e86:)\u3002<\/p>\n<p>\u6700\u540e\u4e00\u6b65\u662f\u5173\u95ed\u9632\u706b\u5899\uff0c\u56e0\u4e3a\u7f51\u6865\u7528\u4e0d\u7740\uff1a<\/p>\n<pre><code>\/etc\/init.d\/firewall disable\n<\/code><\/pre>\n<p>\u91cd\u542f\u7f51\u7edc\u540e\u53ef\u4ee5\u7528ifconfig\u770b\u5230\u5f88\u591a\u7f51\u7edc\u63a5\u53e3\uff0c\u53ea\u8981\u76d1\u542c<strong>br-br0<\/strong>\u5c31\u884c\u4e86\uff1a<\/p>\n<pre><code>br-br0    Link encap:Ethernet  HWaddr 00:74:04:07:4B:CC\n          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1\n          RX packets:0 errors:0 dropped:0 overruns:0 frame:0\n          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0\n          collisions:0 txqueuelen:0\n          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)\n\neth1      Link encap:Ethernet  HWaddr 00:74:04:07:4B:CC\n          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1\n          RX packets:0 errors:0 dropped:0 overruns:0 frame:0\n          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0\n          collisions:0 txqueuelen:1000\n          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)\n          Interrupt:14\n\neth1.0    Link encap:Ethernet  HWaddr 00:74:04:07:4B:CC\n          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1\n          RX packets:0 errors:0 dropped:0 overruns:0 frame:0\n          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0\n          collisions:0 txqueuelen:0\n          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)\n\neth1.1    Link encap:Ethernet  HWaddr 00:74:04:07:4B:CC\n          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1\n          RX packets:0 errors:0 dropped:0 overruns:0 frame:0\n          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0\n          collisions:0 txqueuelen:0\n          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)\n\nlo        Link encap:Local Loopback\n          inet addr:127.0.0.1  Mask:255.0.0.0\n          UP LOOPBACK RUNNING  MTU:16436  Metric:1\n          RX packets:0 errors:0 dropped:0 overruns:0 frame:0\n          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0\n          collisions:0 txqueuelen:0\n          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)\n<\/code><\/pre>\n<h1>\u6d4b\u8bd5<\/h1>\n<ol>\n<li>\u9996\u5148\u5728OpenWrt\u91cc\u5b89\u88c5Tcpdump\uff1a\n<pre><code>opkg install tcpdump\n<\/code><\/pre>\n<\/li>\n<li>\u7528\u7f51\u7ebf\u8fde\u63a5\u7535\u8111\u5230\u8def\u7531\u56683\u53e3\uff08eth1.1\uff09\uff0c\u8def\u7531\u56682\u53e3\uff08\u62160\u30011\u53e3\uff09\u8fde\u63a5\u539f\u672c\u7535\u8111\u7684\u51fa\u53e3\u3002<\/li>\n<li>\u8fd0\u884cTcpdump\u76d1\u542cPOP\u90ae\u7bb1\u5bc6\u7801\uff1a\n<pre><code>tcpdump -X -i br-br0 port 110\n<\/code><\/pre>\n<\/li>\n<\/ol>\n<p>\u5982\u679c\u4f60\u7684\u90ae\u7bb1\u6ca1\u52a0SSL\u7684\u8bdd\uff0c\u5e94\u8be5\u80fd\u770b\u5230\u5bc6\u7801\u660e\u6587\u5566:)\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u8a00 \u5199\u4e86\u4e0a\u4e00\u7bc7\u540e\u6211\u5076\u7136\u60f3\u5230\u7f51\u6865\u4e5f\u53ef\u4ee5\u7528\u6765\u76d1\u542c\u6570\u636e:)\uff0c\u53ea\u8981\u5728\u76ee\u6807PC\u6216\u8def\u7531\u5668\u51fa &hellip; <a href=\"https:\/\/bl4kraven.com\/index.php\/2012\/05\/02\/%e6%89%93%e9%80%a0openwrt%e7%bd%91%e7%bb%9c%e7%9b%91%e5%90%ac%e5%99%a8\/\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a> <a href=\"https:\/\/bl4kraven.com\/index.php\/2012\/05\/02\/%e6%89%93%e9%80%a0openwrt%e7%bd%91%e7%bb%9c%e7%9b%91%e5%90%ac%e5%99%a8\/\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-108","post","type-post","status-publish","format-standard","hentry","category-openwrt"],"_links":{"self":[{"href":"https:\/\/bl4kraven.com\/index.php\/wp-json\/wp\/v2\/posts\/108","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bl4kraven.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bl4kraven.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bl4kraven.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bl4kraven.com\/index.php\/wp-json\/wp\/v2\/comments?post=108"}],"version-history":[{"count":3,"href":"https:\/\/bl4kraven.com\/index.php\/wp-json\/wp\/v2\/posts\/108\/revisions"}],"predecessor-version":[{"id":571,"href":"https:\/\/bl4kraven.com\/index.php\/wp-json\/wp\/v2\/posts\/108\/revisions\/571"}],"wp:attachment":[{"href":"https:\/\/bl4kraven.com\/index.php\/wp-json\/wp\/v2\/media?parent=108"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bl4kraven.com\/index.php\/wp-json\/wp\/v2\/categories?post=108"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bl4kraven.com\/index.php\/wp-json\/wp\/v2\/tags?post=108"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}