由于公司的网络是vpn的,在XP下可以轻松实现连接,但是最近我要转到BSD下,却一直没有好的解决办法 。刚才看到了delphij老大的文章,受益匪浅,转过来,留着自己消化
How to dial PPTP vpn from a FreeBSD box?
This is useful when you want to connect remote "Local" network through a PPTP vpn. First, install the ports/net/pptpclient, by doing:
cd /usr/ports/net/pptpclient
make all install clean && rehash
The next step is to set it up.
cd /etc/ppp
mv ppp.conf ppp.conf.original
cp usr/local/share/examples/pptpclient/ppp.conf .
chmod 640 ppp.conf
vi ppp.conf
Please note that the suggested steps above will remove all your existing ppp configurations.
Here we do some initial setup:
VPN:
set authname [Your username here]
set authkey [Your password here]
set timeout 0
set ifaddr 0 0
add [Destination address here] HISADDR
alias enable yes
Please note that if your VPN connects to many places, you can add more add [foo] HISADDR here. When VPN is dialed up, HISADDR is replaced with PPP protocol with the remote gateway(typically, the server) address.
Then it will be possible to pptp [VPN Server] VPN. Enjoy!
Note that if your case is to replace the default gateway, you must manually have VPN server route set.
How to dial PPTP vpn from a FreeBSD box?
This is useful when you want to connect remote "Local" network through a PPTP vpn. First, install the ports/net/pptpclient, by doing:
cd /usr/ports/net/pptpclient
make all install clean && rehash
The next step is to set it up.
cd /etc/ppp
mv ppp.conf ppp.conf.original
cp usr/local/share/examples/pptpclient/ppp.conf .
chmod 640 ppp.conf
vi ppp.conf
Please note that the suggested steps above will remove all your existing ppp configurations.
Here we do some initial setup:
VPN:
set authname [Your username here]
set authkey [Your password here]
set timeout 0
set ifaddr 0 0
add [Destination address here] HISADDR
alias enable yes
Please note that if your VPN connects to many places, you can add more add [foo] HISADDR here. When VPN is dialed up, HISADDR is replaced with PPP protocol with the remote gateway(typically, the server) address.
Then it will be possible to pptp [VPN Server] VPN. Enjoy!
Note that if your case is to replace the default gateway, you must manually have VPN server route set.
评论
发表评论
读过之后是不是文思泉涌了?,快快让大家拜读一下你的高见吧~~~