看板 Linux 關於我們 聯絡資訊
※ 引述《gn00618777 (非常念舊)》之銘言: : ※ 引述《hizuki (ayaka)》之銘言: : --------------- : | | : | vpn server | : | | : |-------------| : ↑ ↑ : | | : | | : (device 上有兩個interface | | : 一個是tun0:10.8.0.X另一個是eth1 | | : eth1:192.168.30.1) --------- ------------ : device computer : --------- ------------- : ↓↓↓↓ : b1b2b3b4 : b1~b4:192.168.30.X : : 無需nat,也和iptables沒什麼關係。妳要看看openvpn的ccd選項,如果不會可以再問我 : : 。這個通過路由比nat快多了。 : 先謝謝提供關鍵字,但我還差一點。 : server.conf: : client-config-dir ccd : route 192.168.30.0 255.255.255.0 //增加 server 往192.168.30.X 的路由 : push "192.168.30.0 255.255.255.0"// 增加到 client 往 192.168.30.X 的路由 : ccd/client: : iroute 192.168.30.0 255.255.255.0 //告訴server 我 client 有內網192.168.30.X : 然後 : device <-----------------> computer OK : device 底下的設備 ------> computer OK : device 底下的設備 ------> server OK : device 底下的設備 <----------------- server 也ok了!!! : 最後只差 computer -------> device 底下的設備還無法 : 這個 computer 的作業系統為 Windows,我先在 cmd 內加上路由 : "route ADD 192.168.30.0 MASK 255.255.255.0 10.8.0.2" : 但最後 computer 連上 server 還不能 ping 192.168.30.X >"< 妳能告訴我ip a或者ifconfig在computer上的結果嗎?device有點怪,只有實體一個網路 卡嗎?我本來以為device是一個網絡路由器之類的。還是把3個端點openvn配置和ip a(或 者ifconfig)全寫比較快 -- Sent from my Android -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.135.232.131 ※ 文章網址: http://www.ptt.cc/bbs/Linux/M.1417656046.A.C7C.html