# Mautic Behind VPN - email links, sms links, tracking - how does it work

**URL:** <https://forum.mautic.org/t/mautic-behind-vpn-email-links-sms-links-tracking-how-does-it-work/20308>\
**Category:** Product Support\
**Created:** [July 29, 2021, 1:40pm UTC](https://forum.mautic.org/t/mautic-behind-vpn-email-links-sms-links-tracking-how-does-it-work/20308 "2021-07-29T13:40:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)\
**Post date:** [July 29, 2021, 1:40pm UTC](https://forum.mautic.org/t/mautic-behind-vpn-email-links-sms-links-tracking-how-does-it-work/20308/1 "2021-07-29T13:40:55Z")

</div>

We have a client that is running their instance of Mautic behind a VPN.

The issue is that all links generated from emails, text messages, unsubscribe links are being generated with the local IP which is obviously not accessible from outside.

Any suggestions on how to overcome this ?

---

<div class="post-metadata">

**Author:** ![ekke](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ekke/32/296_2.png) [@ekke](https://forum.mautic.org/u/ekke)\
**Post date:** [July 29, 2021, 2:00pm UTC](https://forum.mautic.org/t/mautic-behind-vpn-email-links-sms-links-tracking-how-does-it-work/20308/2 "2021-07-29T14:00:03Z")

</div>

Hi @mikew,

Can you explain a bit more what you mean by “Mautic behind a VPN”?  
Clearly, Mautic itself will _have_ to be accessible from the outside, or else there is no chance for it to ever work.  
Or maybe you mean load balancer?

Cheers  
Ekke

---

<div class="post-metadata">

**Author:** ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)\
**Post date:** [July 29, 2021, 2:07pm UTC](https://forum.mautic.org/t/mautic-behind-vpn-email-links-sms-links-tracking-how-does-it-work/20308/3 "2021-07-29T14:07:25Z")

</div>

Hey @ekke

So this is the issue I have. Client mautic is only accessible once connected to a VPN. So for example I can access their mautic only once I have connected through their VPN. Example I go to [http://10.102.455.32](http://10.102.455.32) and if I am not connected I do not get there obviously. However when I connect to their VPN I am able to access it.

So my initial thought was for serving email images we could use Amazon S3 Bucket, which there is a native Mautic plugin and this works, however when an email is generated the link obviously needs to contain the mautic base url (in this case [http://10.232.32.212/](http://10.232.32.212/)).

I was thinking of using joey’s plugin for multi domain but am not sure this would work either.

So my thought is like you say "clearly mautic itself will _have_ to be accessible from the outside.

Security question here: is it possible to lock it down behind a VPN and for somehow to tell Mautic to generate different tracking links ?

---

<div class="post-metadata">

**Author:** ![ekke](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ekke/32/296_2.png) [@ekke](https://forum.mautic.org/u/ekke)\
**Post date:** [July 29, 2021, 4:06pm UTC](https://forum.mautic.org/t/mautic-behind-vpn-email-links-sms-links-tracking-how-does-it-work/20308/4 "2021-07-29T16:06:46Z")

</div>

Hmm, so you want Mautic to  
(a) send outbound messages → feasable from a VPN’d sytem  
(b) serve anything (trackable links, local or remote assets, …) → impossible if no access from outside

> somehow to tell Mautic to generate different tracking links ?

The tracking can only be done by Mautic, the _tracking_ link has to be the Mautic system!  
Even if you had the same functionality somewhere on the outside, e.g. a lean & secure & performant redirector on the outside, that one would still need a lot of data (tokens, …) from Mautic, and would also need ways to feed it back into Mautic. Not realistic, imho… sorry 😉

_Maybe_ you could proxy certain URL patterns to the secure system? (i.e. have a proxy on the outside which has well-filtered VPN access on the backend and thus could talk to your Mautic)

---

<div class="post-metadata">

**Author:** ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)\
**Post date:** [July 29, 2021, 4:35pm UTC](https://forum.mautic.org/t/mautic-behind-vpn-email-links-sms-links-tracking-how-does-it-work/20308/5 "2021-07-29T16:35:49Z")

</div>

Hey @ekke

Those were my thoughts as well. Thanks for the feedback. I am going to get the client to move it outside the VPN.

---

<div class="post-metadata">

**Author:** ![ekke](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ekke/32/296_2.png) [@ekke](https://forum.mautic.org/u/ekke)\
**Post date:** [July 29, 2021, 5:11pm UTC](https://forum.mautic.org/t/mautic-behind-vpn-email-links-sms-links-tracking-how-does-it-work/20308/6 "2021-07-29T17:11:37Z")

</div>

👍  
Best,  
Ekke
