OpenVPN 通过服务器上网
在Windows环境中架设OpenVPN服务相对比较简单,网上这方面的教程也比较丰富,照葫芦画瓢即可。但是大部分教程都只讲了如何将client与Server通过VPN管道连接起来,使client可以正常访问Server所在的内部网络(这也是VPN的主要应用)。而现实情况中往往有一种需求,就是client需要通过server来访问Internet,即server作为Proxy,对client访问Internet的数据进行转发。互联网上大部分收费的VPN代理都是以这样的方式实现。
那么在OpenVPN中,要怎么实现呢?
OpenVPN 2.3.4 I003/I603 下载地址
Installer (32-bit), Windows XP and later http://swupdate.openvpn.org/community/releases/openvpn-install-2.3.4-I003-i686.exe
Installer (64-bit), Windows XP and later http://swupdate.openvpn.org/community/releases/openvpn-install-2.3.4-I003-x86_64.exe
Installer (32-bit), Windows Vista and later http://swupdate.openvpn.org/community/releases/openvpn-install-2.3.4-I603-i686.exe
Installer (64-bit), Windows Vista and later http://swupdate.openvpn.org/community/releases/openvpn-install-2.3.4-I603-x86_64.exe
Source Tarball (gzip) http://swupdate.openvpn.org/community/releases/openvpn-2.3.4.tar.gz
Source Tarball (xz) http://swupdate.openvpn.org/community/releases/openvpn-2.3.4.tar.xz
Source Zip http://swupdate.openvpn.org/community/releases/openvpn-2.3.4.zip
OpenVPN 2.3.4 I002 下载地址(已修复心脏出血漏洞)
Windows Install 32-bit http://swupdate.openvpn.org/community/releases/openvpn-install-2.3.4-I002-i686.exe
Windows Install 64-bit http://swupdate.openvpn.org/community/releases/openvpn-install-2.3.4-I002-x86_64.exe
Source-zip http://swupdate.openvpn.org/community/releases/openvpn-2.3.4.zip
Source-gzip http://swupdate.openvpn.org/community/releases/openvpn-2.3.4.tar.gz
Source-xz http://swupdate.openvpn.org/community/releases/openvpn-2.3.4.tar.xz
OpenVPN 2.3.3 下载地址
32位 http://swupdate.openvpn.org/community/releases/openvpn-install-2.3.3-I002-i686.exe
64位 http://swupdate.openvpn.org/community/releases/openvpn-install-2.3.3-I002-x86_64.exe
源代码 http://swupdate.openvpn.org/community/releases/openvpn-2.3.3.zip
OpenVPN 2.3.2 下载地址
32Bit http://swupdate.openvpn.org/community/releases/openvpn-install-2.3.2-I001-i686.exe
64Bit http://swupdate.openvpn.org/community/releases/openvpn-install-2.3.2-I001-x86_64.exe
Source Code http://swupdate.openvpn.org/community/releases/openvpn-2.3.2.zip
OpenVPN 2.3 下载地址
32位 http://swupdate.openvpn.org/community/releases/openvpn-install-2.3.0-I005-i686.exe
64位 http://swupdate.openvpn.org/community/releases/openvpn-install-2.3.0-I005-x86_64.exe
源代码 http://swupdate.openvpn.org/community/releases/openvpn-2.3.0.zip
OpenVPN 2.2 下载地址
下安装程序:http://swupdate.openvpn.org/community/releases/openvpn-2.2.2-install.exe
源代码:http://swupdate.openvpn.org/community/releases/openvpn-2.2.2.zip
安装说明在
http://www.cnblogs.com/irisrain/p/4202046.html
一、首先,完成OpenVPN server端与client端的安装与配置。
server配置如下:
# 监听地址
local 0.0.0.0
# 监听端口
port 1194
# 使用TCP或UDP协议
proto tcp
;proto udp
# 使用TAP或TUN模式
dev tap
;dev tun
# 加密认证
ca ca.crt
cert server.crt
key server.key
dh dh1024.pem
# VPN子网
server 10.8.0.0 255.255.255.0
# 路由设置
push "route 0.0.0.0 0.0.0.0"
# 设置网关转发
push "redirect-gateway def1 bypass-dhcp"
# 设置dhcp DNS
push "dhcp-option DNS 114.114.114.114"
push "dhcp-option DNS 8.8.8.8"
ifconfig-pool-persist ipp.txt
duplicate-cn
keepalive 10 120
comp-lzo
persist-key
persist-tun
status openvpn-status.log
verb 3
client配置如下:
client
# 使用TAP或TUN模式
dev tap
;dev tun
# 使用TCP或UDP协议
proto tcp
;proto udp
# server地址端口
remote x.x.x.x 1194
# 加密认证
ca ca.crt
cert client.crt
key client.key
ns-cert-type server
persist-key
persist-tun
comp-lzo
verb 3
要使client通过server连接Internet,则在设置中要注意:
1、使用TAP模式;
2、加入路由设置
push "route 0.0.0.0 0.0.0.0"
3、设置网关转发并设置DNS
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 114.114.114.114"
push "dhcp-option DNS 8.8.8.8"
设置完成,client正常连接server后,使用ipconfig应该能正常看到VPN网关地址,并且能够ping通VPN网关。
二、在Server端,配置好VPN 开启NAT。
OpenVPN 通过服务器上网的更多相关文章
- 通过f5的默认路由使服务器上网
1.通过f5的默认路由使服务器上网 1)将服务器的默认网关指到f5的floating ip 2)f5上配置
- openvpn 连接无法上网
环境:搬瓦工的vps,centos6,搬瓦工附带的openvpn服务端: 出现的问题:正常启动openvpn客户端,也正常连接服务器,但是连接之后就是没有办法上网: 我的解决办法:打开ip forwa ...
- 通过OpenVPN来穿越上网(未实践)
说明: 1.其实OpenVPN可以通过其实现穿越来上网,即全部请求都经过OpenVPN来处理.其原理是iptables转发.如果全程走iptables也是可以的,网上的教程基本都是基于iptables ...
- 使用Dnsmasq搭建本地dns服务器上网
导读 搭建一个属于自己的本地DNS服务器很有必要,利用Dnsmasq来搭建一个属于自己的本地DNS服务器,享受更干净无污染.更智能快速和没有广告干扰的DNS解析服务. 一.Dnsmasq安装 安装并启 ...
- 在Ubuntu14.04上搭建自己的OpenVPN服务器并通过它上网
背景 学校宿舍端口可以配置静态IP连校内网,也可以连到实验室的服务器:实验室的服务器可以连外网:但宿舍要连外网就要花钱买PPPoE账号了.作为壮哉我大计院的一员,本着发扬专(neng)业(sheng) ...
- 利用OpenVPN实现局域网内多台机器共享上网
本文转载自 https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-ubuntu-14- ...
- 绕过校园网的共享限制 win10搭建VPN服务器实现--从入门到放弃
一.开篇立论= =.. 上次说到博主在电脑上搭建了代理服务器来绕过天翼客户端的共享限制,然而经过实际测试还不够完美,所以本着生命不息,折腾不止的精神,我又开始研究搭建vpn服务器= =... (上次的 ...
- WIN2003 设置 OPENVPN 服务端
服务器端 安装openvpn 在这里http://swupdate.openvpn.org/community/releases/openvpn-install-2.3.4-I004-i686.exe ...
- Linux安装配置VPN服务器
一.实验简介 VPN ,中文翻译为虚拟专有网络,英文全称是 Virtual Private Network .现在 VPN 被普遍定义为通过 一个公用互联网络建立一个临时的.安全的连接,是一条穿过混乱 ...
随机推荐
- MIME Sniffing
Abstract: The web.config file does not include the required header to mitigate MIME sniffing attacks ...
- 转:python中对list去重的多种方法
对一个list中的新闻id进行去重,去重之后要保证顺序不变. 直观方法 最简单的思路就是: ids = [1,2,3,3,4,2,3,4,5,6,1] news_ids = [] for id in ...
- 安装Eclipse及相关Plugin
Eclipse: 此处选用基于Eclipse的开发工具:STS 官方网站:https://spring.io/tools/sts Plugins: Open Explorer文件浏览插件it open ...
- 在线api地址
J2SE1.7英文api地址: http://download.oracle.com/javase/7/docs/api/J2SE1.6英文api地址: http://download.oracle ...
- 9.8 js进阶总结3
DOM文档对象模型 DOM(document object model)文档对象模型,它定义了操作文档对象的接口. DOM 把一份html文档表示为一棵家谱树,使用parent(父),child(子) ...
- 使用git从服务器下载已存在的项目文件
在项目所在路径下输入: git remote -v 获得项目在服务器下的路径如下: origin ssh://git@ygl-redis:300/home/git/perfectunits-iphon ...
- $.grep(array, callback, [invert])过滤,常用
$.grep(array, callback, [invert])过滤,常用 解释: 使用过滤函数过滤数组元素.此函数至少传递两个参数(第三个参数为true或false,对过滤函数返回值取反,个人觉得 ...
- ubuntu源码安装node7+
在官网上下载了node的tar.xz文件(node7.3.0),安装分为两步:1.解压 2.安装 解压也分成两步,首先用xz -d xxx.tar.xz解压为xxx.tar,然后用tar -xvf ...
- python生成透时图片and 写文字
import Image from get_png import getpng def transparent(infile): #open png,covert it into 'RGBA mode ...
- WPF 将控件绑定到变量
看了好多博客,发现很多都不能用,嘿嘿,自己终于实现了: 废话不多说,上代码: XAML代码如下: <Window x:Class="WpfApplication7.MainWindow ...