当前位置: > Linux服务器 > VPN >

openvpn 搭建过程

时间:2014-11-30 02:14来源:www.it.net.cn 作者:IT网

 阿里云 centos6 测试可行

执行脚本 installOpenvpn.sh 见附件

上传server.conf 见附件

vi /etc/sysctl.conf
net.ipv4.ip_forward = 1
sysctl -p
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j MASQUERADE
iptables -A INPUT -m state --state NEW -m udp -p udp --dport 1194 -j ACCEPT
iptables -A FORWARD -s 10.8.0.0/24 -p udp --dport 1194 -j ACCEPT

service iptables save
service iptables restart

ps:如果遇到无法连接服务器或者vpn无法上网问题,多半是iptables的设置问题,结合自身vpn的iptables设置进行修改

mac用户可以使用Tunnelblick客户端

client需要文件 client1.crt,client.key,ca.crt

Tunnelblick配置文件 见附件

http://blog.csdn.net/dog250/article/details/6938504

http://meridian.lilnn.com/show/myhost/rt04.html

http://wiki.contribs.org/OpenVPN_SiteToSite

http://www.techrepublic.com/blog/linux-and-open-source/how-to-set-up-a-linux-openvpn-client/

http://www.360doc.com/content/11/1225/00/4171006_174788280.shtml

http://www.linuxfly.org/post/84/

http://charlie928.blog.51cto.com/3741218/1226503

http://showerlee.blog.51cto.com/2047005/1222738

http://www.libertyvps.com/thread-31-1-1.html

http://blog.onovps.com/archives/yum-install-openvpn.html

http://www.live-in.org/archives/1112.html

http://my.oschina.net/qq277049/blog/56688

http://so366.blog.51cto.com/716218/903828

http://www.vixual.net/blog/archives/32




原文  http://macken.iteye.com/blog/1976085


(责任编辑:IT)
------分隔线----------------------------