數位天堂

Nokia:科技始終來自於人性; 拜耳:如果文明不能使我們更相愛,那科技便失去意義!
歡迎您的加入,讓我們一起討論科技與環保的整合應用...

您尚未登入。

#1 2015-12-27 21:56:36

Trevor0
新生
註冊日期: 2015-12-27
文章數: 2
目前積分 :   

Tomato OpenVPN 路由一問?

各位版大
小弟要用 Tomato 架 openvpn server 來翻牆,
小弟已查了不少資料,但還是無法成功.無奈上來救援.
連線有建立起來,client 可以連進 server,但是WAN出不去.
先簡單介紹一下環境
我用的 Asus N16 刷 Tomato Firmware 1.28.0000 MIPSR2-108 K26 USB AIO,
但是是擺在 NAT 內,我已經在 Router 上把 443 轉送進來了.
主要是參考這一份連結
http://www.mobile01.com/topicdetail.php … 716236&p=1
因為可以有很多 client ,所以選擇 TLS,放棄 static key.
其實大部份都一樣.只是換個 port,換另一組網段.
我想主要的問題是在於 Tomato 沒有作 NAT DHCP server,
是不是要設定些什麼呢?這點麻煩各位賜教一下囉!
下圖是 N16 的設定,其中最後一張圖,與別人的圖差很多,
https://digiland.tw/uploads/8980_1.png
https://digiland.tw/uploads/8980_2.png
https://digiland.tw/uploads/8980_3.png
看起來不太像 server 正常啟動.
這一點看各位版大有沒有什麼想法,因為我找不到什麼資料是和這有關的.
另外一點,查很多 openvpn server 的資料都說要在 server 端,下這些參數
push "redirect-gateway"
push "route-gateway 192.168.0.7"
push "route 192.168.0.0 255.255.255.0"
push "dhcp-option DNS 192.168.0.3"
我觀念不清楚,此時的 gateway 是 openvpn server
還是 server side 的 gateway,
DNS 也是同樣的問題?
最後附上 Log 看看版大能不能看出什麼問題?

Dec 27 16:32:03 unknown user.info kernel: tun: Universal TUN/TAP device driver, 1.6
Dec 27 16:32:03 unknown user.info kernel: tun: (C) 1999-2004 Max Krasnyansky
Dec 27 16:32:03 unknown user.info kernel: device tun22 entered promiscuous mode
Dec 27 16:32:03 unknown daemon.notice openvpn[2702]: OpenVPN 2.3.0 mipsel-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [MH] [IPv6] built on Mar  3 2013
Dec 27 16:32:03 unknown daemon.warn openvpn[2702]: NOTE: your local LAN uses the extremely common subnet address 192.168.0.x or 192.168.1.x.  Be aware that this might create routing conflicts if you connect to the VPN server from public locations such as internet cafes that use the same subnet.
Dec 27 16:32:03 unknown daemon.warn openvpn[2702]: NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Dec 27 16:32:03 unknown daemon.notice openvpn[2702]: Diffie-Hellman initialized with 1024 bit key
Dec 27 16:32:03 unknown daemon.notice openvpn[2702]: Socket Buffers: R=[87380->131072] S=[16384->131072]
Dec 27 16:32:03 unknown daemon.notice openvpn[2702]: TUN/TAP device tun22 opened
Dec 27 16:32:03 unknown daemon.notice openvpn[2702]: TUN/TAP TX queue length set to 100
Dec 27 16:32:03 unknown daemon.notice openvpn[2702]: do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Dec 27 16:32:03 unknown daemon.notice openvpn[2702]: /sbin/ifconfig tun22 10.8.0.1 pointopoint 10.8.0.2 mtu 1500
Dec 27 16:32:03 unknown daemon.notice openvpn[2702]: /sbin/route add -net 10.8.0.0 netmask 255.255.255.0 gw 10.8.0.2
Dec 27 16:32:03 unknown daemon.notice openvpn[2710]: Listening for incoming TCP connection on [undef]
Dec 27 16:32:03 unknown daemon.notice openvpn[2710]: TCPv4_SERVER link local (bound): [undef]
Dec 27 16:32:03 unknown daemon.notice openvpn[2710]: TCPv4_SERVER link remote: [undef]
Dec 27 16:32:03 unknown daemon.notice openvpn[2710]: MULTI: multi_init called, r=256 v=256
Dec 27 16:32:03 unknown daemon.notice openvpn[2710]: IFCONFIG POOL: base=10.8.0.4 size=62, ipv6=0
Dec 27 16:32:03 unknown daemon.notice openvpn[2710]: MULTI: TCP INIT maxclients=1024 maxevents=1028
Dec 27 16:32:03 unknown daemon.notice openvpn[2710]: Initialization Sequence Completed
Dec 27 16:32:07 unknown daemon.notice openvpn[2710]: TITLE,OpenVPN 2.3.0 mipsel-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [MH] [IPv6] built on Mar  3 2013
Dec 27 16:32:07 unknown daemon.notice openvpn[2710]: TIME,Sun Dec 27 16:32:07 2015,1451205127
Dec 27 16:32:07 unknown daemon.notice openvpn[2710]: HEADER,CLIENT_LIST,Common Name,Real Address,Virtual Address,Bytes Received,Bytes Sent,Connected Since,Connected Since (time_t),Username
Dec 27 16:32:07 unknown daemon.notice openvpn[2710]: HEADER,ROUTING_TABLE,Virtual Address,Common Name,Real Address,Last Ref,Last Ref (time_t)
Dec 27 16:32:07 unknown daemon.notice openvpn[2710]: GLOBAL_STATS,Max bcast/mcast queue length,0
Dec 27 16:32:07 unknown daemon.notice openvpn[2710]: END




離線

 

#2 2015-12-28 09:03:13

chrism
新生
註冊日期: 2009-08-08
文章數: 23
目前積分 :   

Re: Tomato OpenVPN 路由一問?

Trevor0 提到:

各位版大
小弟要用 Tomato 架 openvpn server 來翻牆,
小弟已查了不少資料,但還是無法成功.無奈上來救援.
連線有建立起來,client 可以連進 server,但是WAN出不去.
先簡單介紹一下環境
我用的 Asus N16 刷 Tomato Firmware 1.28.0000 MIPSR2-108 K26 USB AIO,
但是是擺在 NAT 內,我已經在 Router 上把 443 轉送進來了.
主要是參考這一份連結
http://www.mobile01.com/topicdetail.php … 716236&p=1
因為可以有很多 client ,所以選擇 TLS,放棄 static key.
其實大部份都一樣.只是換個 port,換另一組網段.
我想主要的問題是在於 Tomato 沒有作 NAT DHCP server,
是不是要設定些什麼呢?這點麻煩各位賜教一下囉!

紅字部分,你前面還有台ROUTER,先試試不經過那台ROUTER是否成功,再找原因吧!
我猜想比較有可能是網段的問題。



離線

 

#3 2015-12-29 19:57:30

Trevor0
新生
註冊日期: 2015-12-27
文章數: 2
目前積分 :   

Re: Tomato OpenVPN 路由一問?

我沒法動 硬體接線,所以沒法改變接線方法,但是連線可以建立,我在想應該是有通.
問了一下 google 大部份都是些路由的問題.但是沒看到什麼作法.
有沒有比較接近的資料可以參考.我對路由部份不太熟.


離線

 

#4 2016-02-08 23:47:06

hung75
新生
註冊日期: 2016-02-08
文章數: 6
目前積分 :   

Re: Tomato OpenVPN 路由一問?

我的設定跟你一樣,不過我是直接當分享器來使用,如果直接當分享器的話,拿來當跳板是沒有問題的


離線

 

相關討論主題

主題 回覆 點閱 最後發表
置頂
置頂: [Tomato Shibby] 正體中文化韌體下載 作者 Aven  [ 1 2 3 … 163 ]
1624 2774670 2023-12-09 02:26:28 作者 qingtian
置頂
置頂: Tomato 後續延伸版本 FreshTomato 作者 wen1977  [ 1 2 3 4 ]
32 71525 2022-12-08 17:24:20 作者 dir868l
Tomato Shibby v140 韌體更新 作者 Service  [ 1 2 3 … 16 ]
155 313216 2022-12-08 17:08:17 作者 dir868l
置頂
置頂: [精華] Tomato 網路資源及文章索引 作者 Aven  [ 1 2 3 … 6 ]
54 192844 2022-09-15 12:25:01 作者 chiachu
222 461356 2022-09-14 14:54:52 作者 chiachu

友情連結

論壇頁尾

Powered by PunBB
© Copyright 2018 Rickard Andersson
RSS Feed