惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

罗磊的独立博客
www.infosecurity-magazine.com
www.infosecurity-magazine.com
V
Visual Studio Blog
T
The Blog of Author Tim Ferriss
GbyAI
GbyAI
Y
Y Combinator Blog
雷峰网
雷峰网
Last Week in AI
Last Week in AI
Jina AI
Jina AI
月光博客
月光博客
G
Google Developers Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Webroot Blog
Webroot Blog
Google DeepMind News
Google DeepMind News
博客园 - 三生石上(FineUI控件)
Hacker News - Newest:
Hacker News - Newest: "LLM"
N
News | PayPal Newsroom
H
Heimdal Security Blog
Recorded Future
Recorded Future
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
腾讯CDC
AWS News Blog
AWS News Blog
NISL@THU
NISL@THU
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 【当耐特】
P
Privacy International News Feed
I
Intezer
V
Vulnerabilities – Threatpost
The GitHub Blog
The GitHub Blog
L
LINUX DO - 最新话题
S
Schneier on Security
C
CXSECURITY Database RSS Feed - CXSecurity.com
小众软件
小众软件
博客园 - 聂微东
V2EX - 技术
V2EX - 技术
W
WeLiveSecurity
Security Latest
Security Latest
PCI Perspectives
PCI Perspectives
The Hacker News
The Hacker News
T
Threatpost
C
Check Point Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Latest news
Latest news
L
LINUX DO - 热门话题
J
Java Code Geeks
A
Arctic Wolf
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
T
Troy Hunt's Blog

Alliot's blog

Docker 代理配置机制与作用域 2025年底的安卓搞机备忘录 ArgoCD部署应用出现metadata.annotations过大问题 APC UPS更换电池校准容量 M1 Mac安装低版本Node.js Ansible使用Bitwarden存储Vault密码 Cloudflare Tunnel前置代理支持 CDN场景下配置Vaultwarden启用fail2ban 中银香港丝滑开户总结 从指定路径更新雷池WAF证书 AWS ECS使用EBS作为Volume 浅浅的调教一下国产智障电视 Nginx proxy_pass到AWS ALB的504问题 本地模拟CNAME解析 Nginx搭建WebDAV服务 迎来船新版本的Hexo+NexT 优雅的处理Git多帐号与代理问题 验光配镜扫盲 Prometheus relabel实现动态metrics path
OpenV**手动指定路由规则
Alliot · 2023-12-20 · via Alliot's blog

  我们在远程办公时通常需要通过内部 OpenV** 来访问公司内部的敏感系统, 默认情况下, OpenV** 会临时修改本地路由表,将所有流量都指向了 v**_gateway,导致一些本地规则被覆盖,甚至无法打开部分国内的网站,带来了很多不便。这里记录一下手动指定路由规则的配置,仅让指定的网段或域名走 gateway。

  文中为了脱敏,涉及到的关键字均由 ** 替代, 配置文件处请手动替换回来,避免配置错误。

指定网段/IP路由

默认情况下,OpenV** 启动时会增加类似的路由, 这些路由来自服务端定义,由客户端 pull 下来:

1
2
add net 0.0.0.0: gateway 10.40.79.1
add net 128.0.0.0: gateway 10.40.79.1

我们可以在配置文件中添加如下规则,取消pull路由,并新增我们需要路由的网段:

1
2
3
4
5
6
7
8
9
10
11
12
13
14

route-nopull


max-routes 1000


route 123.123.123 255.255.255.255 v**_gateway




route 10.0.0.0 255.255.255.0 v**_gateway
route 172.16.0.0 255.255.255.0 v**_gateway

指定域名路由

只通过 IP/网段来配置路由多少有些不方便,我们可以通过域名/FQDN来配置路由规则,例如我们仅 www.iots.vip 需要走网关,则可以添加如下规则:

1
2
3
4
5
6
7
8
9
10

route-nopull




allow-pull-fqdn


route www.iots.vip 255.255.255.255 v**_gateway

尾巴

注意, IP/网段路由与域名/FQDN 两者不冲突,可以共存。
同时,如果你是 macOS ,建议直接使用 CLI 版本:

1
2
3
4
5
# 安装CLI, ! ! ! 记得替换**  ! ! !
brew install openv**

# 连接,需要用sudo ! ! ! 记得替换** ! ! !
sudo openv** --config config.ov**(配置文件路径) --script-security 2