openvpn 搭建过程
vi /etc/sysctl.confnet.ipv4.ip_forward = 1sysctl -p
?iptables设置
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j MASQUERADEiptables -A INPUT -m state --state NEW -m udp -p udp --dport 1194 -j ACCEPTiptables -A FORWARD -s 10.8.0.0/24 -p udp --dport 1194 -j ACCEPTservice iptables saveservice iptables restart
ps:如果遇到无法连接服务器或者vpn无法上网问题,多半是iptables的设置问题,结合自身vpn的iptables设置进行修改
?
3.client配置
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