Koozali.org: home of the SME Server

sme9admin advanced tests

Offline Mophilly

  • *
  • 384
  • +0/-0
    • Mophilly
sme9admin advanced tests
« 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:
Code: [Select]
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?
- Mark

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: sme9admin advanced tests
« Reply #1 on: July 23, 2019, 11:59:27 PM »
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.

...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline Jean-Philippe Pialasse

  • *
  • 2,743
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: sme9admin advanced tests
« Reply #2 on: July 24, 2019, 01:35:47 AM »
nothing harmful
just try to get an answer from the different services or ping a distant one

« Last Edit: July 24, 2019, 01:38:24 AM by Jean-Philippe Pialasse »

Offline mmccarn

  • *
  • 2,626
  • +10/-0
Re: sme9admin advanced tests
« Reply #3 on: July 24, 2019, 01:13:06 PM »
When you run each test it tells you the command that gets run and shows the results.

Quote from: Test http service    http@
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")

Quote from: Test samba service    smbcontrol
Execution of 'smbcontrol smbd ping' (samba server answers giving its PID):

PONG from pid 2879

Quote from: Test network latency    ping
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

Quote from: Test ftp service    telnet 21
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

Quote from: Test ssh service    telnet 22
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")

Quote from: Test pop service    telnet 110
Execution of 'echo "quit" | nc 192.168.200.2 110' (pop server running):

+OK <22203.1563966138@mysme.smeserver.tld>

+OK

Quote from: Test smtp service    telnet 25
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.

Offline Jean-Philippe Pialasse

  • *
  • 2,743
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: sme9admin advanced tests
« Reply #4 on: July 24, 2019, 08:50:49 PM »
(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

Offline mmccarn

  • *
  • 2,626
  • +10/-0
Re: sme9admin advanced tests
« Reply #5 on: July 25, 2019, 02:05:26 PM »
The ssh/port 22 issue is already in the bug tracker:
https://bugs.contribs.org/show_bug.cgi?id=10761
Code: [Select]
# 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.

Offline Mophilly

  • *
  • 384
  • +0/-0
    • Mophilly
Re: sme9admin advanced tests [solved]
« Reply #6 on: September 06, 2019, 06:29:56 AM »
Great! It was fun to run the tests. Nothing blew up or changed the server state so far as I can tell. 😊
- Mark