posts - 17,  comments - 6,  trackbacks - 0
          routeros之hotspot設置
          參照routeros的手冊,針對我的情況作了部分修改。已經在2.7.14和2.8.11上測試通過。

          我的routeros是2塊網卡,ether1連接adsl,做pppoe client,ether2連接局域網。
          首先按照論壇上置頂的說明正確安裝并配置routeros,實現客戶機能夠正常上網。
          然后terminal routeros

          改變www服務端口為8081:
          /ip service set www port=8081

          改變hotspot服務端口為80,為用戶登錄頁面做準備:
          /ip service set hotspot port=80


          Setup hotspot profile to mark authenticated users with flow name "hs-auth":
          /ip hotspot profile set default mark-flow="hs-auth" login-method=enabled-address

          增加一個用戶:
          /ip hotspot user add name=user1 password=1


          重定向所有未授權用戶的tcp請求到hotspot服務
          /ip firewall dst-nat add in-interface="ether2" flow="!hs-auth" protocol=tcp action=redirect
          to-dst-port=80 comment="redirect unauthorized clients to hotspot service"


          允許dns請求、icmp ping ;拒絕其他未經認證的所有請求:
          /ip firewall add name=hotspot-temp comment="limit unauthorized hotspot clients"

          /ip firewall rule forward add in-interface=ether2 action=jump
          jump-target=hotspot-temp comment="limit access for unauthorized hotspot clients"

          /ip firewall rule input add in-interface=ether2 dst-port=80 protocol=tcp
          action=accept comment="accept requests for hotspot servlet"

          /ip firewall rule input add in-interface=ether2 dst-port=67 protocol=udp
          action=accept comment="accept requests for local DHCP server"

          /ip firewall rule input add in-interface=ether2 action=jump
          jump-target=hotspot-temp comment="limit access for unauthorized hotspot clients"

          /ip firewall rule hotspot-temp add flow="hs-auth" action=return
          comment="return if connection is authorized"

          /ip firewall rule hotspot-temp add protocol=icmp action=return
          comment="allow ping requests"

          /ip firewall rule hotspot-temp add protocol=udp dst-port=53 action=return
          comment="allow dns requests"

          /ip firewall rule hotspot-temp add action=reject
          comment="reject access for unauthorized clients"

          創建hotspot通道給認證后的hotspot用戶
          Create hotspot chain for authorized hotspot clients:
          /ip firewall add name=hotspot comment="account authorized hotspot clients"

          Pass all through going traffic to hotspot chain:
          /ip firewall rule forward add action=jump jump-target=hotspot
          comment="account traffic for authorized hotspot clients"


          客戶機輸入任何網址,都自動跳轉到登陸頁面,輸入賬號密碼,繼續瀏覽。
          如果使用ftp、pop3等,也必須先通過網頁登錄,才可以使用,當然使用winbox的時候也必須先登錄。
          posted on 2006-03-20 21:04 風中的舞者 閱讀(233) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          <2025年8月>
          272829303112
          3456789
          10111213141516
          17181920212223
          24252627282930
          31123456

          常用鏈接

          留言簿(1)

          隨筆檔案

          文章檔案

          java技術

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 普兰县| 台中县| 许昌市| 德惠市| 深州市| 阿勒泰市| 盈江县| 丹巴县| 阿拉善右旗| 施甸县| 会昌县| 合山市| 琼结县| 肥乡县| 阜阳市| 海宁市| 周宁县| 文成县| 宁国市| 桦甸市| 阜阳市| 怀来县| 武山县| 宜兰县| 锦屏县| 邵东县| 扶沟县| 泰兴市| 榆树市| 麻江县| 栾川县| 桐庐县| 临夏市| 泰兴市| 会泽县| 赤城县| 浮梁县| 荆州市| 从化市| 龙陵县| 彝良县|