![]() |
||
New Member
加入日期: May 2009
文章: 5
|
[網路問題]OPENVPN該如何設定PORT轉送
網路架構示意圖如下
![]() 目前123.xxx.xxx.xxx的電腦都可以連140.xxx.xxx.xxa的電腦 140.xxx.xxx.xx之間的電腦可以互連 但是140.xxx.xxx.xxb跟140.xxx.xxx.xxc的電腦不允許外部ip連接 openvpn已經在140.xxx.xxx.xxa上面架設完成 123.xxx.xxx.xxx的電腦也可以順利從140.xxx.xxx.xxa的電腦上拿到192.168.3.x的ip 也可以在123跟140兩個網段間互相ping的到192.168.3.x的ip 可是目前可能是router路徑問題 123.xxx.xxx.xxx的電腦要連接140.xxx.xxx.xxb跟140.xxx.xxx.xxc的電腦 還是走真實ip的通道 而不是走140.xxx.xxx.xxa開vpn後的192.168.3.x的通道 請問該如何解決 謝謝 |
|||||||
![]() |
![]() |
*停權中*
加入日期: Mar 2008
文章: 203
|
route add 140.xxx.xxx.0 mask xxx.xxx.xxx.xxx 140.xxx.xxx.a
route add 192.168.3.0 mask xxx.xxx.xxx.xxx 140.xxx.xxx.a 此文章於 2009-05-03 01:58 AM 被 誠實豆沙包 編輯. |
||
![]() |
![]() |
New Member
加入日期: May 2009
文章: 5
|
補充一下
雙方都在xp下 以下使用xp的route print指令 得到router列表如下 Active Routes: Network Destination Netmask Gateway Interface Metric 0.0.0.0 0.0.0.0 123.xxx.xxx.254 123.xxx.xxx.81 20 127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1 140.113.218.0 255.255.255.0 192.168.3.5 192.168.3.6 1 123.xxx.xxx.0 255.255.255.0 123.xxx.xxx.81 123.xxx.xxx.81 20 123.xxx.xxx.81 255.255.255.255 127.0.0.1 127.0.0.1 20 123.xxx.255.255 255.255.255.255 123.xxx.xxx.81 123.xxx.xxx.81 20 192.168.3.0 255.255.255.0 192.168.3.5 192.168.3.6 1 192.168.3.4 255.255.255.252 192.168.3.6 192.168.3.6 30 192.168.3.6 255.255.255.255 127.0.0.1 127.0.0.1 30 192.168.3.255 255.255.255.255 192.168.3.6 192.168.3.6 30 224.0.0.0 240.0.0.0 123.xxx.xxx.81 123.xxx.xxx.81 20 224.0.0.0 240.0.0.0 192.168.3.6 192.168.3.6 30 255.255.255.255 255.255.255.255 123.xxx.xxx.81 123.xxx.xxx.81 1 255.255.255.255 255.255.255.255 192.168.3.6 192.168.3.6 1 Default Gateway: 123.xxx.xxx.254 =========================================================================== Persistent Routes: None 根據網友提示輸入 以下指令 route add 140.xxx.xxx.0 mask 255.255.255.0 140.xxx.xxx.a route add 192.168.3.0 mask 255.255.255.0 140.xxx.xxx.a 或以下指令 route add 140.xxx.xxx.0 mask 255.255.255.0 140.xxx.xxx.a metric if route add 192.168.3.0 mask 255.255.255.0 140.xxx.xxx.a metric if 皆得到錯誤訊息如下 The route addition failed: Either the interface index is wrong or the gateway does not lie on the same network as the interface. Check the IP Address Table for the machine. 謝謝 此文章於 2009-05-03 02:34 AM 被 網路問題 編輯. |
![]() |
![]() |
*停權中*
加入日期: Mar 2008
文章: 203
|
route add 192.168.3.0 mask 255.0.0.0 [140.xxx.xxx.a這台的"192.168.3.x"]
route change 也可 此文章於 2009-05-03 02:49 AM 被 誠實豆沙包 編輯. |
![]() |
![]() |
New Member
加入日期: May 2009
文章: 5
|
E:\route add 192.168.3.0 mask 255.0.0.0 192.168.3.1
The route addition failed: The specified mask parameter is invalid. (Destination & Mask) != Destination. E:\route change 192.168.3.0 mask 255.0.0.0 192.168.3.1 The route change failed: The specified mask parameter is invalid. (Destination & Mask) != Destination. 執行後出現上述狀況 route列表沒有更改 此外openvpn也有點小問題 openvpn的網路卡拿到的ip是沒有gateway的 只有拿到 ip 192.168.3.3 mask 255.255.255.0 沒有gateway 謝謝 |
![]() |
![]() |
Major Member
![]() 加入日期: Dec 2004
文章: 224
|
建議你可以試試看Port forwarding
|
![]() |
![]() |
*停權中*
加入日期: May 2004
文章: 2,140
|
如果是DHCP
在DHCP時就可以指定路由派發了吧 |
![]() |
![]() |