Page 1 of 1

Cannot use Web Admin on remote host

Posted: Mon Aug 22, 2016 6:29 pm
by mgunther
OK.. only playing with this here. This is my test and situation:
- AWS Ubuntu VM, no GUI installed
- VRS and Web Admin plugin installed, both version 2.4
- can ssh into the VM remotely (i.e. from my laptop)
- did mono VirtualRadar.exe -nogui -createAdmin:name -password:password
- VRS starts fine with: mono VirtualRadar.exe
- can access http://<AWS VM host>:8080/VirtualRadar/desktop.html (this displays nothing obviously but at least I'm getting there)

My problem is that I cannot access the Web Admin page at: http://<AWS VM host>:8080/VirtualRadar/WebAdmin/Index.html

I think this may be because the plugin does not allow access from the Internet. But in order to allow access from the Internet, I need to log into the Web Admin page and configure it. But what to do if I cannot get there in the first place? Is there a config file that can be written or edited?

Just to demonstrate the issue further:
From the AWS Ubuntu VM console I get this:
wget http://<AWS VM host>:8080/VirtualRadar/WebAdmin/Index.html
HTTP request sent, awaiting response... 401 Unauthorized
Username/Password Authentication Failed.
(meaning I get the page but I did not specify the correct Username/Password)

But from an external source, i.e. a Raspberry Pi I get:
wget http://<AWS VM host>:8080/VirtualRadar/WebAdmin/Index.html
HTTP request sent, awaiting response... 403 Forbidden
(meaning I cannot get the the requested page because I'm not allowed to connect to it from an external location)

If anyone has any idea how to get around this and allow external access, let me know please :)

Re: Cannot use Web Admin on remote host

Posted: Mon Aug 22, 2016 9:24 pm
by mgunther
Update:
I configured the Web Admin plugin for open access on my laptop (Mac/OSX) and then copied ~.local/share/VirtualRadar/PluginsConfiguration.txt file from the laptop to the same location on the AWS Ubuntu VM. Restarted VRS and bingo, I can now access the Web Admin remotely :D
For future reference, the contents of the file with just open access configured for Web Admin (and nothing else) looks like this:

Code: Select all

VirtualRadar.Plugin.WebAdmin.Options=%7b%22DataVersion%22%3a2%2c%22Enabled%22%3atrue%2c%22Access%22%3a%7b%22DefaultAccess%22%3a0%2c%22Addresses%22%3a%5b%5d%7d%7d

Re: Cannot use Web Admin on remote host

Posted: Tue Aug 23, 2016 1:37 am
by agw
By default the web admin plugin is configured to block all access unless it's from the local loopback or a LAN address. If you're using SSH then you could create an SSH tunnel mapping local port 8080 to the remote port 8080 (or whatever VRS is listening to) and then browse to http://127.0.0.1:8080/WebAdmin/Index.html. That way you can continue to keep it restricted to LAN and local loopback but still use it remotely. I've been doing that with a remote installation of VRS that I've got running on a Pi2.

Re: Cannot use Web Admin on remote host

Posted: Tue Aug 23, 2016 8:22 am
by mgunther
Thanks! I'll give that a go when I get a chance. In the meantime I got over the hurdle by copying the config file as above. But yeah that means the Web Admin access is currently not restricted (except for the password which I should update...).

Re: Cannot use Web Admin on remote host

Posted: Thu Sep 28, 2017 2:04 pm
by ktul_adsb
mgunther wrote:Update:
I configured the Web Admin plugin for open access on my laptop (Mac/OSX) and then copied ~.local/share/VirtualRadar/PluginsConfiguration.txt file from the laptop to the same location on the AWS Ubuntu VM. Restarted VRS and bingo, I can now access the Web Admin remotely :D
For future reference, the contents of the file with just open access configured for Web Admin (and nothing else) looks like this:

Code: Select all

VirtualRadar.Plugin.WebAdmin.Options=%7b%22DataVersion%22%3a2%2c%22Enabled%22%3atrue%2c%22Access%22%3a%7b%22DefaultAccess%22%3a0%2c%22Addresses%22%3a%5b%5d%7d%7d
Just wanted to say thanks for this, I am trying to get VRS running on a VPS, and spent an hour trying to figure out how to access the webadmin site from my external ip. :D

Re: Cannot use Web Admin on remote host

Posted: Mon Jun 18, 2018 10:42 pm
by philhyde
mgunther wrote:
Mon Aug 22, 2016 9:24 pm
Update:
I configured the Web Admin plugin for open access on my laptop (Mac/OSX) and then copied ~.local/share/VirtualRadar/PluginsConfiguration.txt file from the laptop to the same location on the AWS Ubuntu VM. Restarted VRS and bingo, I can now access the Web Admin remotely :D
For future reference, the contents of the file with just open access configured for Web Admin (and nothing else) looks like this:

Code: Select all

VirtualRadar.Plugin.WebAdmin.Options=%7b%22DataVersion%22%3a2%2c%22Enabled%22%3atrue%2c%22Access%22%3a%7b%22DefaultAccess%22%3a0%2c%22Addresses%22%3a%5b%5d%7d%7d
Sorry, old post.... but wanted to thank the user for posting this! Works a treat. 8-)