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 被普遍定义为通过 一个公用互联网络建立一个临时的.安全的连接,是一条穿过混乱 ...
随机推荐
- sasscore22
1.setting 如果不需要支持ie6,7,请在引入setting文件之前,设置$lte7:false;. $lte7: true !default 表示的是是否兼容it6/7 2.css3 是一 ...
- ---arch linux 下装wordpress
首先要先装apach和phphttps://translate.google.com/translate?hl=zh-CN&sl=de&tl=en&u=https%3A%2F% ...
- win10无法使用内置管理员账户打开应用怎么办
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System \UIPI 右边有个默认的项.将它的值改成1
- poj1050
To the Max Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 39081 Accepted: 20639 Desc ...
- 【转】 C# 小技巧之获取变量名称
link: http://www.cnblogs.com/gongy/p/lm-2015-04-03.html 今天在自我规范程序设计的时候,变量名匹配字符串来自配置文件,网上找了一会儿发现也有朋友在 ...
- c#利用反射获取对象属性值
public static string GetObjectPropertyValue<T>(T t, string propertyname){ Type type = type ...
- c++ oop
C ++语言的主要优势之一是与其前身语言C不同的是,它被设计为支持面向对象编程(OOP). 这是一个相当简单的概念:你将操纵不同的对象,每个对象都是一个特定类的实例. 类是一组方法(绑定到这个类的函数 ...
- Python第二模块(文件和函数)
1. 集合操作 集合的特点:无序,不重复的数据组合 集合的作用: 去重,将列表变为集合,就会自动去重 关系测试,测试两组数据之间的交集.差集.并集关系 常用操作: #创建集合 s = {1,2, ...
- Eclipse 的常用快捷方式
快捷方式<!--[if !supportLists]-->0. Ctrl + 1 (快速修复)<!--[if !supportLists]-->1. Ctrl + D (删除当 ...
- dg
package excel; import java.util.Scanner; public class doExcel { public static void main(String args[ ...