0

External Machine cannot access phpmyadmin through VPN on USG. I get the FORBIDDEN You Dont' have permission to access /phpmyadmin on this server."

Internal Machine has no issue.

  • I have whitelisted the machines as per conf file below:
  • I have configured USG (gateway) and external MACBookPro using this guide: https://help.ubnt.com/hc/en-us/articles/115005445768-UniFi-USG-Configuring-L2TP-Remote-Access-VPN
  • It worked pretty much straight away.
  • I only had to tick the box that said "Send all traffic over VPN connection".
  • If I search "what is my IP" in Google I get my WAN IP returned is correct, on both machines.
  • Ext. 192.168.2.1 external MACBook via VPN.
  • Int. 192.168.1.222 internal desktop can access phpmyadin.
  • E

I can ping all machines from both machines So the network is allowing the traffic. On a unifi controlled network, with a USG, radius server turned on.

Here is part of my phpmyadmin.conf file:

<Directory /usr/share/phpMyAdmin/>
   AddDefaultCharset UTF-8

   <IfModule mod_authz_core.c>
     # Apache 2.4
     <RequireAny>
       Require ip 192.168.1.0/24
       Require ip 192.168.2.1
       Require ip 127.0.0.1
       Require ip ::1
     </RequireAny>
   </IfModule>
   <IfModule !mod_authz_core.c>
     # Apache 2.2
     Order Deny,Allow
     Deny from All
     Allow from 192.168.1.0/24
     Allow from 192.168.2.1
     Allow from 127.0.0.1
     Allow from ::1
   </IfModule>
</Directory>

My thoughts are the unifi USG is dealing with the traffic from the tunnel differently than a internal machine??? Maybe internal is hitting a loop back whereas maybe external machine is going via an external gateway and being seen differently??? Or my phpmyadmin.conf is wrong.

I can add more info if you need more.

  • Show me Listen directive, please. – Oxyd Mar 04 '20 at 14:02
  • You need to see which address you are coming from, to then see if it matches one of the `Allow`lines. Check the apache `access.log`. What does it show? – Eduardo Trápani Mar 04 '20 at 15:28
  • I am not familiar with Listen Directive, I have dealt with it once before a long time ago, can you be a little more specifc with what you want to see... happy to provide what ever detail. – TheArchitecta Mar 05 '20 at 18:22

0 Answers0