Hi guys, need a bit of help with Virtualmin remote API...
Using putty to try to make a call between two Virtualmin VPS Systems
both on the same service provider network and using the same network firewall for both
each Virtualmin system also has its own firewalld configuration
system names are...
host1.fqdn
host3.fqdn
So, from host1.fqdn, i add the following as root user in putty:
wget --http-user=root --http-passwd=tL!2PJuoYo,t$av} 'https://host3.fqdn:10000/virtual-server/remote.cgi?program=list-domains'
Response...
wget --http-user=root --http-passwd=tLwget http://software.virtualmin.com/gpl/scripts/install.shPJuoYo,t$av} 'https://host3.fqdn:10000/virtual-server/remote.cgi?program=list-domains'
--2019-05-30 08:43:39-- http://software.virtualmin.com/gpl/scripts/install.shPJuoYo,t%7D
Resolving software.virtualmin.com (software.virtualmin.com)... 149.28.242.101
Connecting to software.virtualmin.com (software.virtualmin.com)|149.28.242.101|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2019-05-30 08:43:39 ERROR 404: Not Found.
user = root
password = #password
wget --http-user=root --http-passwd=#password 'https://host1.fqdn:10000/virtual-server/remote.cgi?program=list-domains''
it just times out.
Resolving host3.fqdn (host3.fqdn)... xx.xx.xx.xx
Connecting to host3.fqdn (host3.fqdn)|xx.xx.xx.xx|:10000...
Questions...
In the first exampple above, why is this particular password causing this to happen? seems like Virtualmin doesnt like the "!" symbol in the password that was automatically generated by Vultr.com when i setup the test vps (is this a bug?)
Is the Virtualmin remote api not able to accept symbols in passwords?
In the second example above with the timeout... Am i doing something wrong in the above command in putty for remote calls between Virtualmin VPS servers?
If my command is correct, what are the likely causes of the timeout?
Howdy,
I think the issue is that Bash is interpreting characters/symbols in that password before they get to Virtualmin, which is causing some unusual issues.
To get around that, you could use a different password, or you could escape the special characters. I believe you could also just put it within ' characters. There's also ways to have wget prompt you for a password, or set an environment variable with a password.
-Eric
Hi Erik, thanks for that.
A final question...does this work if the two Virtualmin servers are not on the same network IP address range?
My ipv4 addresses for each VPS, whilst still on the Vultr network using the same firewall, are different.
I got the feeling from the documentation that the two servers must be on the same ipv4 network?
for example
host1.fqdn is ipaddress 123,45,67,89
host3.fqdn is ipaddress 102,98,76,54
Do remote calls on Virtualmin work between two Virtualmin VPS that have completely different Ipv4 ranges like mine above?
Or do both servers have to be on the same Ipv4 address range? (ie both similar to host1.fqdn because this is the system where the calls are being made from)
https://ajecreative.com.au