大网数据广告活动
服务器运维问答

How do I configure NetworkManger-OpenVPN to only use a VPN for some IPs?

· 52CE 我爱测

My company is using a pfsense router to manage a simple VPN for the office. The idea is that I should be able to connect to the VPN from home and use it to (a) access servers on the office LAN and (b) visit our AWS-based webserve…

问题原文

原帖链接 · Daniel Quinn · CC BY-SA 3.0

My company is using a pfsense router to manage a simple VPN for the office. The idea is that I should be able to connect to the VPN from home and use it to (a) access servers on the office LAN and (b) visit our AWS-based webservers over ports 22 and 80 via the VPN.

Unfortunately, it's currently setup as an all-or-nothing deal: if I connect to the office VPN, all of my web traffic goes through there, and I'd rather not do that.

I'm running GNOME 3.22.2 with NetworkManager and the OpenVPN plugin on Gentoo Linux, so help with these tools in mind would be appreciated.

已采纳解答

原帖链接 · Ismail Gjevori · CC BY-SA 4.0

First install network-manager-openvpn and network-manager-openvpn-gnome.

Restart the network-manager service (check for your system)

sudo systemctl restart network-manager.service

and go to the Network Settings. From there add a new VPN

Add a new VPN

probably by choosing Import from file (.ovpn file).

After adding username and password go to the IPV4 tab and select the option Use this connection only for resources on its network

Choose the option image

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-03-16)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0 / CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。