This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Open port check from Logic Machine
#1
Is there a script or something to check if an outgoing port is open. It department says the port is open. But i dont seem to get the Lm communicating.
Reply
#2
Use this to check if LM can connect to a certain TCP port or not.
Code:
function checktcp(ip, port)
  local sock = require('socket').tcp()
  sock:settimeout(1)
  local res, err = sock:connect(ip, port)
  sock:close()
  return res, err
end

-- change IP/PORT as needed
res, err = checktcp('192.168.1.1', 80)
if res then
  log('connect OK')
else
  log('connect ERROR', err)
end
Reply
#3
Ok, thanks. 

Just post this in Resident script and add the ip of the Lm5 and the port 8883. Correct?
Reply
#4
No this is the IP/domain where you want to connect to.
------------------------------
Ctrl+F5
Reply
#5
Ok, i am trying to test remote.logicmachine.net with port 8883. Ping works great. But trying the port.

Ok, then i know the port is still closed.
Thanks for help. 

* arg: 1
  * string: connect ERROR
* arg: 2
  * string: timeout
Reply
#6
What port does Zerotier use on the LM, is it 9993. Not getting any confirmation on Zerotier from the LM.
It only says "requesting confirmation". But not seen in Zerotier.
Reply
#7
ZeroTier uses 9993 UDP. The example script is for checking connection to TCP servers. Can you try checking remote.logicmachine.net port 443?
Reply
#8
* string: connect OK

That works. IT just opened the 8883 to remote.logicmachine.net for me. Because that was the original thread.

But i cant seem to get the zerotier working. Have 4 other LM on Zerotier, only this one that i am not getting the request at Zerotier.
Reply
#9
See this: https://zerotier.atlassian.net/wiki/spac...ation+Tips
Reply
#10
9993 was closed on router. Now its working. 

Thanks a lot.
Reply


Forum Jump: