# Creating and using OpenVPN connection on server via client

**URL:** <https://community.thinlinc.com/t/creating-and-using-openvpn-connection-on-server-via-client/1055>\
**Category:** Community Support\
**Tags:** vpn\
**Created:** [20 August 2024 09:53 UTC](https://community.thinlinc.com/t/creating-and-using-openvpn-connection-on-server-via-client/1055 "2024-08-20T09:53:44Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Unsettled](https://avatars.discourse-cdn.com/v4/letter/u/dec6dc/32.png) [@Unsettled](https://community.thinlinc.com/u/Unsettled)\
**Post date:** [20 August 2024 09:53 UTC](https://community.thinlinc.com/t/creating-and-using-openvpn-connection-on-server-via-client/1055/1 "2024-08-20T09:53:44Z")

</div>

Hi there,  
I’ve been using ThinLinc for around 2 weeks and it’s working great. I’m just using it to access a Linux Mint headless desktop that I use just for work.

When I create a new OpenVPN connection by on my other machines by importing a .ovpn file using the Network Manager GUI it works just fine. However, if I try to do the same when connected to the remote machine I get the message:

```auto
System policy prevents control of network settings for all users

```

Entering my local user password allows the connection to be created. When using the connection I get the same prompt but when I enter my password I completely lose control of the system. I can exit out of the connection by hitting F8. the re-connecting fails.

The remote box is a Proxmox VM with a GPU passed through. VirtualGL is working fine. When accessing the remote using a SPICE display I don’t get this problem.

Can anyone help please?

Thanks

NTB

---

<div class="post-metadata">

**Author:** ![aaron](https://dub1.discourse-cdn.com/flex005/user_avatar/community.thinlinc.com/aaron/32/13_2.png) [@aaron](https://community.thinlinc.com/u/aaron)\
**Post date:** [21 August 2024 02:47 UTC](https://community.thinlinc.com/t/creating-and-using-openvpn-connection-on-server-via-client/1055/2 "2024-08-21T02:47:11Z")

</div>

Hi @Unsettled, welcome to the forum 🙂

Are you trying to establish the VPN connection from within the remote session?

We’ve had reports of this causing problems in the past. VPN clients can alter the network configuration and cause issues with ThinLinc. SPICE connects on a different layer and may not exhibit the same behaviour.

Wild guess - but you could try setting the `agent_hostname` parameter to something which always resolves correctly for the connecting client. You’ll find this parameter in `/opt/thinlinc/etc/conf.d/vsmagent.hconf`, and make sure you restart the `vsmagent` service afterwards.

Let us know how you go.

---

<div class="post-metadata">

**Author:** ![Unsettled](https://avatars.discourse-cdn.com/v4/letter/u/dec6dc/32.png) [@Unsettled](https://community.thinlinc.com/u/Unsettled)\
**Post date:** [21 August 2024 20:34 UTC](https://community.thinlinc.com/t/creating-and-using-openvpn-connection-on-server-via-client/1055/4 "2024-08-21T20:34:41Z")

</div>

Hi and thanks for the replies. I’ll try the suggestions and report back

NTB

---

<div class="post-metadata">

**Author:** ![Unsettled](https://avatars.discourse-cdn.com/v4/letter/u/dec6dc/32.png) [@Unsettled](https://community.thinlinc.com/u/Unsettled)\
**Post date:** [2 September 2024 08:59 UTC](https://community.thinlinc.com/t/creating-and-using-openvpn-connection-on-server-via-client/1055/5 "2024-09-02T08:59:33Z")

</div>

I set agent\_hostname to the name of the desktop I’m connecting to and put it in the hcsts file of the client hosts file. The VPN connection gets established but I’m unable to connect to any of its resources. When I disconnected for the VPN the thinlinc session times out and I’m unable to connect. Nor can I ping its hostname nor address.

Thanks,

N

---

<div class="post-metadata">

**Author:** ![aaron](https://dub1.discourse-cdn.com/flex005/user_avatar/community.thinlinc.com/aaron/32/13_2.png) [@aaron](https://community.thinlinc.com/u/aaron)\
**Post date:** [3 September 2024 23:15 UTC](https://community.thinlinc.com/t/creating-and-using-openvpn-connection-on-server-via-client/1055/6 "2024-09-03T23:15:20Z")

</div>

Hi, just to clarify - are you trying to establish the VPN connection from your local (client) machine? Or from within a ThinLinc session on the server?

---

<div class="post-metadata">

**Author:** ![Unsettled](https://avatars.discourse-cdn.com/v4/letter/u/dec6dc/32.png) [@Unsettled](https://community.thinlinc.com/u/Unsettled)\
**Post date:** [5 September 2024 15:16 UTC](https://community.thinlinc.com/t/creating-and-using-openvpn-connection-on-server-via-client/1055/7 "2024-09-05T15:16:45Z")

</div>

From the Thinlinc session on the server

---

<div class="post-metadata">

**Author:** ![aaron](https://dub1.discourse-cdn.com/flex005/user_avatar/community.thinlinc.com/aaron/32/13_2.png) [@aaron](https://community.thinlinc.com/u/aaron)\
**Post date:** [5 September 2024 21:35 UTC](https://community.thinlinc.com/t/creating-and-using-openvpn-connection-on-server-via-client/1055/8 "2024-09-05T21:35:42Z")

</div>

VPN clients tend to manipulate network configuration and routing tables in different ways, and I guess this is affecting ThinLinc’s ability to maintain a connection somehow. So I don’t think there’s anything which can be done within ThinLinc to fix it.

If the VPN is a requirement, you may need to look at setting up separate network interfaces on your server, one for ThinLinc and one for the VPN. Then hopefully they won’t interfere with each other.

Hope that helps.
