[問題] openvpn 無法存取任何server以外的IP

看板Linux作者 (美凪)時間9年前 (2014/10/03 13:46), 9年前編輯推噓0(001)
留言1則, 1人參與, 最新討論串1/1
最近試著設定openvpn卻無法得到預期的效果, 測試結果是無法存取主機以外的任何位置(包含使用IP而非domain name), 主機的部分則是正確的連上並可以使用像ssh/ftp之類的服務, 因為希望使用openvpn的時候也能瀏覽網頁, 所以想要麻煩有類似設定經驗的版友幫忙看看設定檔有什麼地方寫錯了, 麻煩大家了(若是需要額外資訊也請告知 我會盡快補上) #iptables of server (partial) iptables -A INPUT -p UDP --dport 7752 -j ACCEPT iptables -A INPUT -i tun+ -j ACCEPT iptables -A OUTPUT -o tun+ -j ACCEPT iptables -A FORWARD -i tun+ -o eth0 -j ACCEPT iptables -A FORWARD -o tun+ -i eth0 -j ACCEPT iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j SNAT --to [static IP] #server.conf port 7752 proto udp dev tun ca ca.crt cert server.crt key server.key dh dh1024.pem server 10.8.0.0 255.255.255.0 ifconfig-pool-persist ipp.txt push "redirect-gateway def1 bypass-dhcp" keepalive 10 120 tls-auth ta.key 0 comp-lzo max-clients 3 persist-key persist-tun status openvpn-status.log log-append openvpn.log verb 4 #client.conf client dev tun proto udp remote [static ip] 7752 resolv-retry infinite nobind persist-key persist-tun mute-replay-warnings ca "C:\\Program Files (x86)\\OpenVPN\\config\\[...].crt" cert "C:\\Program Files (x86)\\OpenVPN\\config\\[...].crt" key "C:\\Program Files (x86)\\OpenVPN\\config\\[...].key" ns-cert-type server tls-auth [...].key 1 comp-lzo verb 4 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 1.34.64.129 ※ 文章網址: http://www.ptt.cc/bbs/Linux/M.1412315199.A.A53.html ※ 編輯: minagi (1.34.64.129), 10/03/2014 13:47:24

10/03 14:15, , 1F
net.ipv4.ip_forward 有開嗎?
10/03 14:15, 1F
相當感謝 不知道有這個設定 開了之後換成DNS找不到 在client.conf補上 dhcp-option DNS 8.8.8.8 目前正常運作中 ※ 編輯: minagi (1.34.64.129), 10/03/2014 14:45:02
文章代碼(AID): #1KBZW_fJ (Linux)