歡迎您光臨本站 註冊首頁

網關機上架設VPN不成功

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

網關機上架設VPN不成功

系統 Mandriva 2007 1 free
已安裝 kernel-MPPE 補丁
kernel_ppp_mppe-0.0.4-2dkms
pptpd-server-1.3.0-2mdv2007.0
ppp-2.4.4-1mdv2007.1

pptpd.conf配置如下:
ppp /usr/sbin/pppd
option /etc/ppp/options.pptpd
debug
logwtmp
localip 222.90.xx.xx
remoteip 192.168.5.100-200

options.pptpd配置如下:

name pptpd
refuse-pap
refuse-chap
refuse-mschap
require-mschap-v2
require-mppe-128
-chap
-chapms
+chapms-v2
mppe-128
mppe-stateless
proxyarp
debug
dump
lock
nobsdcomp
novj
novjccomp
logfile = /var/log/pptpd.log



還有重啟pptpd報錯:
# service pptpd restart
Shutting down pptpd:                                            [  OK  ]
Starting pptpd:                                                 [  OK  ]
Warning: a pptpd restart does not terminate existing
/etc/init.d/pptpd: line 51: grpintf: command not found
address and cause unexpected results.  Use restart-kill to
destroy existing connections during a restart.

以下為iptables代碼:
/sbin/modprobe ip_tables
/sbin/modprobe ip_nat_ftp
/sbin/modprobe ip_conntrack_ftp
/sbin/iptables -F
/sbin/iptables -F -t nat
/sbin/iptables -X
/sbin/iptables -Z

/sbin/iptables -P INPUT ACCEPT
/sbin/iptables -P FORWARD ACCEPT
/sbin/iptables -P OUTPUT ACCEPT

echo "1"> /proc/sys/net/ipv4/ip_forward
/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
/sbin/iptables -A FORWARD -s 0/0 -d 0/0 -j ACCEPT
/sbin/iptables -A INPUT -p tcp --dport 1723 -j ACCEPT
/sbin/iptables -A INPUT -p tcp --dport 47 -j ACCEPT
/sbin/iptables -A INPUT -p gre -j ACCEPT
《解決方案》

沒人知道嗎?

沒人知道嗎?:wink:
《解決方案》

看下能ping通vpn server嗎?
還有把報錯解決下的好.
《解決方案》

可以ping通

而以在連接的時候。。。進程出現在量TIME_WAIT

tcp        0      0 192.168.1.219:1723          192.168.1.29:2480           TIME_WAIT
tcp        0      0 192.168.1.219:1723          192.168.1.29:2481           TIME_WAIT
tcp        0      0 192.168.1.219:1723          192.168.1.29:2482           TIME_WAIT
tcp        0      0 192.168.1.219:1723          192.168.1.29:2483           TIME_WAIT
tcp        0      0 192.168.1.219:1723          192.168.1.29:2484           TIME_WAIT
tcp        0      0 192.168.1.219:1723          192.168.1.29:2485           TIME_WAIT
tcp        0      0 192.168.1.219:1723          192.168.1.29:2486           TIME_WAIT
tcp        0      0 192.168.1.219:1723          192.168.1.29:2487           TIME_WAIT
tcp        0      0 192.168.1.219:1723          192.168.1.29:2488           TIME_WAIT
tcp        0      0 192.168.1.219:1723          192.168.1.29:2472           TIME_WAIT
tcp        0      0 192.168.1.219:1723          192.168.1.29:2489           TIME_WAIT
tcp        0      0 192.168.1.219:1723          192.168.1.29:2473           TIME_WAIT
tcp        0      0 192.168.1.219:1723          192.168.1.29:2490           TIME_WAIT
tcp        0      0 192.168.1.219:1723          192.168.1.29:2474           TIME_WAIT
tcp        0      0 192.168.1.219:1723          192.168.1.29:2491           TIME_WAIT
tcp        0      0 192.168.1.219:1723          192.168.1.29:2475           TIME_WAIT
tcp        0      0 192.168.1.219:1723          192.168.1.29:2492           TIME_WAIT
tcp        0      0 192.168.1.219:1723          192.168.1.29:2476           TIME_WAIT
tcp        0      0 192.168.1.219:1723          192.168.1.29:2477           TIME_WAIT
tcp        0      0 192.168.1.219:1723          192.168.1.29:2478           TIME_WAIT
tcp        0      0 192.168.1.219:1723          192.168.1.29:2479           TIME_WAIT
《解決方案》

192.169.1.29是你的clinet?
192.168.1.0/24這是你vpn虛擬的ip段?
《解決方案》

原帖由 flyingzf 於 2007-7-31 17:56 發表 http://bbs.chinaunix.net/images/common/back.gif
系統 Mandriva 2007 1 free
已安裝 kernel-MPPE 補丁
kernel_ppp_mppe-0.0.4-2dkms
pptpd-server-1.3.0-2mdv2007.0
ppp-2.4.4-1mdv2007.1

pptpd.conf配置如下:
ppp /usr/sbin/pppd
option /etc/ppp/op ...

localip 222.90.xx.xx
remoteip 192.168.5.100-200


沒有看懂你是如何設置ip的。

# TAG: localip
# TAG: remoteip
#       Specifies the local and remote IP address ranges.
#
#       Any addresses work as long as the local machine takes care of the
#       routing.  But if you want to use MS-Windows networking, you should
#       use IP addresses out of the LAN address space and use the proxyarp
#       option in the pppd options file, or run bcrelay.
#
#       You can specify single IP addresses seperated by commas or you can
#       specify ranges, or both. For example:
#
#               192.168.0.234,192.168.0.245-249,192.168.0.254
#
#       IMPORTANT RESTRICTIONS:
#
#       1. No spaces are permitted between commas or within addresses.
#
#       2. If you give more IP addresses than MAX_CONNECTIONS, it will
#          start at the beginning of the list and go until it gets
#          MAX_CONNECTIONS IPs. Others will be ignored.
#
#       3. No shortcuts in ranges! ie. 234-8 does not mean 234 to 238,
#          you must type 234-238 if you mean this.
#
#       4. If you give a single localIP, that's ok - all local IPs will
#          be set to the given one. You MUST still give at least one remote
#          IP for each simultaneous client.


也不清楚你怎麼得到219及29的ip的,根本不在你的地址分配池裡面。

[ 本帖最後由 i770880 於 2007-8-2 12:12 編輯 ]
《解決方案》

Server IP 192.168.1.219
29就是我在IP為 192.168.1.29的機器上連接VPN
《解決方案》

你沒看我紅體字的提示嗎?
那麼你那個222地址的localip是你的獨立的   1個   外網ip而不是指的  地址池  吧?不知這樣設置的理由是什麼?先換成你的內網219的地址試一試吧。
還有,你分配的remoteip與你的伺服器不在同一網段,好像還要進行一次NAT,具體在精華裡面找。為了實驗方便,建議先不要分網段,讓rempteip與伺服器同段進行實驗,一步步來。
《解決方案》

多謝。立刻實驗!
《解決方案》

換成同網段的也是一樣。。。
錯誤 800:不能建立VPN連接。VPN伺服器可能不能到達,或者此連接的安全參數沒有正確配置!


能加QQ具體說一下嗎?
QQ:82838714
E-mail flyingzf@126.com

[ 本帖最後由 flyingzf 於 2007-8-3 22:06 編輯 ]

[火星人 ] 網關機上架設VPN不成功已經有640次圍觀

http://coctec.com/docs/service/show-post-36869.html