Koozali.org: home of the SME Server
Obsolete Releases => SME 9.x Contribs => Topic started by: mophilly on July 23, 2019, 06:42:45 PM
-
In the server manager panel for sme9admin is a link "Advanced connection tests on services ". This leads to a page like this:
These differents tests may produce false positives, do not take care of them.
Execute them only if you know what they do, and how to analyse their results.
Test http service http@
Test samba service smbcontrol
Test network latency ping
Test ftp service telnet 21
Test ssh service telnet 22
Test pop service telnet 110
Test smtp service telnet 25
I appreciate the caveat above the options. I would like to know what they do *before* I invoke them.
Where are these functions documented?
-
Just use a test VM :-)
Virtual machines make this sort of stuff trivial.
I have no idea how they work. I'd take a quick squint at the code down in /etc/e-smith/web... somwhere.
-
nothing harmful
just try to get an answer from the different services or ping a distant one
-
When you run each test it tells you the command that gets run and shows the results.
Execution of 'http@' (should return html source code of server's homepage):
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
</p>
<p>Additionally, a 400 Bad Request
error was encountered while trying to use an ErrorDocument to handle the request.</p>
</body></html>
(My server is configured to serve Wordpress from an ibay using the default address, which probably explains the 400 error. My web server is working exactly as I want it to, so this is a "false positive")
Execution of 'smbcontrol smbd ping' (samba server answers giving its PID):
PONG from pid 2879
Execution of 'ping google.fr -c 1' (latency):
PING google.fr (172.217.15.67) 56(84) bytes of data.
64 bytes from iad23s63-in-f3.1e100.net (172.217.15.67): icmp_seq=1 ttl=56 time=4.35 ms
--- google.fr ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 161ms
rtt min/avg/max/mdev = 4.359/4.359/4.359/0.000 ms
Execution of 'echo "SYST" | nc 192.168.200.2 21' (ftp opened to the external network):
220 192.168.200.2 FTP server ready
215 UNIX Type: L8
Execution of 'echo "hello" | nc 192.168.200.2 22' (ssh opened to the external network):
(ssh is not using port 22 on my server, so the ssh test shows no response - another "false positive")
Execution of 'echo "quit" | nc 192.168.200.2 110' (pop server running):
+OK <22203.1563966138@mysme.smeserver.tld>
+OK
Execution of 'echo "quit" | nc -i 2 192.168.200.2 25' (smtp server running):
220 mysme.smeserver.tld ESMTP
221 smeserver.tld closing connection. Have a wonderful day.
-
(My server is configured to serve Wordpress from an ibay using the default address, which probably explains the 400 error. My web server is working exactly as I want it to, so this is a "false positive")
wrong syntax ?
checking the log i can see
test 127.0.0.1 - - [24/Jul/2019:14:46:47 -0400] "GET / HTTP/1.0" 400 347 "-" "-"
while a hit with browser will give
test 192.168.1.2 - - [24/Jul/2019:14:48:01 -0400] "GET / HTTP/1.1" 200 1061 "-" "-"
might need to rise a bug
(ssh is not using port 22 on my server, so the ssh test shows no response - another "false positive")
this is a potential bug and should raise a bug to adapt the test using the e-smith db to choose the port
-
The ssh/port 22 issue is already in the bug tracker:
https://bugs.contribs.org/show_bug.cgi?id=10761
# rpm -qa smeserver-sme9admin
smeserver-sme9admin-1.5-28.el6.sme.noarch
The http@ issue puzzles me.
As I read the docs, http@ and http@ 127.0.0.1 should give the same results -- but they don't.
* http@ returns a 400 error page and shows a 400 error in the httpd/access_log.
* http@ 127.0.0.1 returns no content and shows a 301 error in the log
The http@ program
http@ gets a web page from a remote host.
Interface
http@ host page port
http@ connects to port on host, sends
GET /page HTTP/1.0
Host: host
to host, and prints the contents of the response, removing CR from the end of each line.
If port is not supplied, http@ uses TCP port 80 (HTTP).
If page is not supplied, http@ asks for / from host.
If host is not supplied, http@ connects to the local host.
-
Great! It was fun to run the tests. Nothing blew up or changed the server state so far as I can tell. 😊