Logic Machine Forum
Check NTP port opened - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: Check NTP port opened (/showthread.php?tid=4520)



Check NTP port opened - khalil - 21.01.2023

Hello
How to check the NTP port open or not in the LM?


RE: Check NTP port opened - admin - 23.01.2023

Use this test script:
Code:
res = io.readproc('ntpd -dnq -p 0.europe.pool.ntp.org 2>&1')
log(res)
NTP uses UDP port 123, check that it's not blocked on the firewall/router.


RE: Check NTP port opened - khalil - 24.01.2023

Thanks admin
if Port opened I should get something like this:
Code:
* string: ntpd: '0.europe.pool.ntp.org' is 194.58.200.20
ntpd: sending query to 194.58.200.20
ntpd: reply from 194.58.200.20: offset:-0.009966 delay:0.108452 status:0x24 strat:1 refid:0x00535050 rootdelay:0.000000 reach:0x01
ntpd: sending query to 194.58.200.20
ntpd: reply from 194.58.200.20: offset:-0.009715 delay:0.107909 status:0x24 strat:1 refid:0x00535050 rootdelay:0.000000 reach:0x03



RE: Check NTP port opened - admin - 24.01.2023

Yes, this is a correct response when NTP server can be reached.