[操作疑難] OpenVPN @N56U Gateway問題

爬左幾日文
終於Config左個OpenVPN Server
但係就係差一步用唔到Router隻Gateway






Client:
dev tap
proto tcp
remote 192.168.1.1 443
client
resolv-retry infinite
nobind
mute-replay-warnings
ca ca.crt
cert client.crt
key client.key
comp-lzo
verb 3
redirect-gateway def1
status openvpn-client-status.log
push "redirect-gateway def1"
push "dhcp-option DNS 8.8.8.8"

N56U圖一中間果個位
# Custom user conf file for OpenVPN server
# Please add needed params only!

### Authenticate packets with HMAC using message digest algorithm
auth SHA1      # SHA1 160 bit (default)
;auth SHA256    # SHA256 256 bit
;auth SHA512    # SHA512 512 bit

### Encrypt packets with cipher algorithm
cipher BF-CBC        # Blowfish 128 bit (default)
;cipher AES-128-CBC   # AES 128 bit
;cipher AES-256-CBC   # AES 256 bit
;cipher DES-EDE3-CBC  # Triple-DES 192 bit
;cipher none          # No encryption

### Enable LZO compression on the VPN link
comp-lzo

### Max clients limit
max-clients 10

### Internally route client-to-client traffic
client-to-client

### Allow clients with duplicate "Common Name"
;duplicate-cn

### Keepalive and timeout
keepalive 10 60

### Process priority level (0..19)
nice 3

### Syslog verbose level
verb 0
mute 10


push "redirect-gateway def1"
push "dhcp-option DNS 8.8.8.8"

Client ipconfig /all
乙太網路卡 區域連線 3:

   連線特定 DNS 尾碼 . . . . . . . . :
   描述 . . . . . . . . . . . . . . .: TAP-Windows Adapter V9
   實體位址 . . . . . . . . . . . . .: 00-FF-BC-85-30-F9
   DHCP 已啟用 . . . . . . . . . . . : 是
   自動設定啟用 . . . . . . . . . . .: 是
   連結-本機 IPv6 位址 . . . . . . . : fe80::9db4:9242:70d7:8bb3%15(偏好選項)
   IPv4 位址 . . . . . . . . . . . . : 192.168.1.250(偏好選項)
   子網路遮罩 . . . . . . . . . . . .: 255.255.255.0
   租用取得 . . . . . . . . . . . . .: 2014年9月22日 下午 05:40:49
   租用到期 . . . . . . . . . . . . .: 2015年9月22日 下午 05:40:49
   預設閘道 . . . . . . . . . . . . .:
   DHCP 伺服器 . . . . . . . . . . . : 192.168.1.0
   DHCPv6 IAID . . . . . . . . . . . : 335609788
   DHCPv6 用戶端 DUID. . . . . . . . : 00-01-00-01-1B-2C-6D-1C-00-19-D1-89-3B-E6

   DNS 伺服器 . . . . . . . . . . . .: 8.8.8.8
                                       8.4.4.8
                                       8.8.8.8
   NetBIOS over Tcpip . . . . . . . .: 啟用


我見D文都係加句push "redirect-gateway def1" #強制客戶端以此VPN server為Default Gateway
但係又好似唔得咁

你client果邊既network用緊咩subnet

TOP

本帖最後由 tomleehk 於 2014-9-22 20:30 編輯

1) The openvpn virtual network should use different subnet from router's network..
2) Server certificate mistakenly captured..

For the public server certificate file, you should use notepad to  ONLY  copy the content between

"-----BEGIN CERTIFICATE-----" and  "----END CERTIFICATE-----" inclusive.

You should NOT paste the whole file. It is a little bit tricky when pasting the the server certificate file.

TOP

你可以試下唔用 redirect-gateway def1 用依個
  1. push route "192.168.1.0 255.255.255.0 192.168.1.1 1"
複製代碼
唔知work唔work, 我vpn個ip係10.x , 用redirect-gateway def1 就已經work

TOP

相關文章