All Plasma Server processes can provide status and configuration information on an additional port using the HTTP protocol. This is enabled by setting the following configuration variables:
HttpListenPort=1234
The standard ports in the PlasmaServers.ini is Auth_Server on port 7675, Lookup_Server on port 7677, Lobby_Server on port 7676, Vault_Server on 7678 and Server_Agent on 7679. Use your favourite browser to access the information, for example
http://localhost:7677/
to access the Lookup Server (assuming you are starting the browser on the server).
If you browse the information, you may see that it is not a good idea to have the information publicly available. Because the information is useful, you should try to prevent the public from accessing the pages but allow access from a local browser or the LAN. You can use the following rule to prevent others from accessing the pages:
iptables -A INPUT -i eth0 -p tcp --dport 7675:7679 -j DROP
assuming your default policy is to allow incoming connections. This stops all incoming connections over interface eth0 to the port range from 7675 to 7679. If you use a dialup the interface might be ppp0. You can still access the ports from localhost and other interfaces besides eth0.
Uru Vision setup
Note: There is also a modified version of Uru Vision in the SubversionRepository that accesses a helper script (in PHP) to access the lookup server.
I want people to see my SystemView (for UruVision, it is up to you if you want to take the risk of providing some server information), so I want to make http://myserver.domain:7677/SystemView available, which provides the xml information UruVision uses. I have an Apache server running, so instead of blocking the port 7677 altogether I redirect it to the Apache server:
iptables -A PREROUTING -d 1.2.3.4 -p tcp -m tcp --dport 7677 -j DNAT --to 1.2.3.4:80
Unfortunately UruVision uses the IP address as host name in its HTTP header to access the information, so you need to configure a virtual host to accept it.
<Virtual Host *> ServerName 1.2.3.4 DocumentRoot /path/to/uruwww RewriteEngine On RewriteRule ^SystemView /path/to/uruwww/systemview.cgi ... more config ... </VirtualHost>
My systemview.cgi perl script just acts as proxy and grabs the info from localhost:
use IO::Socket;
my $sock = new IO::Socket::INET (
PeerAddr => '127.0.0.1',
PeerPort => '7677',
Proto => 'tcp',
);
die "Could not create connection: $!\n" unless $sock;
print $sock "GET /SystemView HTTP/1.0", "\n\n";
# ignore first line
$firstline = <$sock>;
while (<$sock>) {
print;
}
close($sock);This is one way to do it. The nice thing is that you now have full control of what you do with the incoming HTTP requests. For example, you can protect access by setting up a .htaccess file in your /path/to/uruwww to only allow admins to access the information. Maybe more about this later.