[HOME] [DOWNLOAD] [DOCS] [NEWS] [SUPPORT] [TIPS] [ISSUES] [DONATE]

user tunnel purpose

Hello,

Can you please describe the purpose of running openvpn as user ‘tunnel’ per the “…VPN-Firewall#How_to_use_VPN-Firewall” guide, as in, what does this accomplish and how so?

I understand this should be tested but I’d like to know this ownership modification to /etc/openvpn is expected to work with any VPN.

Thank you.

This was written long time ago.

Since OpenVPN will be run under user tunnel, that user requires read access to the folder /etc/openvpn.

sudo chown -R tunnel:tunnel /etc/openvpn
  • On reflection sudo chown -R tunnel:tunnel /etc/openvpn might not be needed but still a good idea. Would be enough if that folder was world-readable. But we probably don’t want that.
  • The folder owned by user tunnel means that OpenVPN could also write to that folder. That seems not needed and therefore shouldn’t be allowed.

Still set owner to to user/group tunnel.

sudo chown -R tunnel:tunnel /etc/openvpn

Remove write and execute permission for owner and group.

sudo chmod ug-wx tunnel:tunnel /etc/openvpn

Remove read/write/execute permission for others

sudo chmod o-rwx tunnel:tunnel /etc/openvpn

sudo chown -R tunnel:tunnel /var/run/openvpn

This is more useful (openvpn running as user tunnel writes there) but even then chmod would be useful to prevent others from reading files inside that folder.

https://github.com/adrelanos/vpn-firewall/blob/master/usr/lib/tmpfiles.d/50_openvpn-unpriv.conf could use an update/review/hardening. Patches welcome.

VPN service/server doesn’t matter since the software to use, only ever tested, is OpenVPN.

You may use my attached public key if you please, and may I have yours?
(Not a huge deal but I try to practice using pgp.)

“* The folder owned by user tunnel means that OpenVPN could also write
to that folder. That seems not needed and therefore shouldn’t be
allowed.”

You mean that OpenVPN could write to that tunnel-owned folder because
it isn’t owned by root like everything else in /etc? My /etc/openvpn is
owned by root by default so it must function fine by default, no? Why
should OpenVPN write to that folder if it’s not allowed by default?

And perhaps a dumb question, if we don’t want write/execute for owner
and group nor read/write/execute for others, then must I
password-protect user tunnel even though I don’t need to login as
tunnel? Otherwise another user could login as tunnel and read files
seemingly.

Thank you very much.

(Attachment pubkey.asc is missing)

Here is my public key since my attachment was rejected. Thank you again.

-----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LkI5hEtXCLZIPJxz4JGIe+/cP+mZxcFALE2kGl
Z6VEEfBTbJoE5Y9BFzZGCWkwGQRMmptOEM8JQVRACOo3B7xvBppkUaqg/wL+MO08
Pa4YvsGg2DIKRWRlLxrY3dZHakdgyFvpbqsMJtR0
=pQQG
-----END PGP PRIVATE KEY BLOCK-----

This is a public forum. And my time is very limited. Therefore I am not suited as OpenPGP training partner.

Yes.

Ok.

This is only if you follow the instructions.

No. No password set is different from empty password. In essence: no password set = no login possible.

Thank you very much, you were helpful. I was not requesting pgp
training, only that we encrypt messages, but again it’s no biggie.

Dude you posted the key that keeps the messages encrypted…

It’s called private because it is meant to stay that way. I hope you didn’t use it in anything important.

1 Like

Re: key

Aha, I knew I would do something stupid. Well fortunately it’s no
biggie and I can change the key.

[Imprint] [Privacy Policy] [Cookie Policy] [Terms of Use] [E-Sign Consent] [DMCA] [Investors] [Priority Support] [Professional Support]