# 借助openwrt路由器 讓未裝Tailscale的設備也能訪問其網內成員 **Published by:** [Stever Dove](https://paragraph.com/@stever-dove/) **Published on:** 2023-06-28 **URL:** https://paragraph.com/@stever-dove/openwrt-tailscale ## Content 本文介紹了讓openwrt充當網關,讓LAN下面未安裝Tailscale的設備也能訪問其網路的方法: 第一步、使用 opkg 安裝 tailscale,如果需要完成這一步那麼需要確保在線倉庫源工作正常。 第二步、使用命令,在路由器上啟動Tailscale: tailscale up –accept-dns=false —-accept-routes 之後按照提示Login即可,推薦順便前往網頁控制關閉 key expire。由於是路由器,所以不可以允許Tailscale下發DNS設置。故有–accept-dns=false選項。 第三步、進入路由器的網頁介面 找到 網路-防火牆-基本設定 將頁面上半部分的 入站數據、出站數據、轉發 都設置為允許(不是頁面下半部分的 區域 部分) 第四步、找到網頁介面中的 網路-防火牆-自定義規則 輸入以下內容後 點擊網頁上的 重載防火牆 按鈕 iptables -I FORWARD -i tailscale0 -j ACCEPT ip6tables -I FORWARD -i tailscale0 -j ACCEPT iptables -I FORWARD -o tailscale0 -j ACCEPT ip6tables -I FORWARD -o tailscale0 -j ACCEPT iptables -t nat -I POSTROUTING -o tailscale0 -j MASQUERADE Done,現在任意位於LAN中的設備都可以訪問Tailscale網路中的成員了。 ## Publication Information - [Stever Dove](https://paragraph.com/@stever-dove/): Publication homepage - [All Posts](https://paragraph.com/@stever-dove/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@stever-dove): Subscribe to updates