Board index FlightGear Support Interfacing

IP 0 when trying to set telnet server

Connecting two computers, using generic protocol, connecting with Matlab?

IP 0 when trying to set telnet server

Postby matanNoach » Thu Apr 01, 2021 5:29 pm

Hello everyone,
I am trying to set up a telnet server in flight gear but I am having a bit of an issue. I followed the steps in this guide: https://wiki.flightgear.org/Telnet_usage
I changed the settings to "--telnet=5401" (I also tried few other ports), but when I tried to connect using bash to the sever with the command "telnet localhost 5401", I got an error: "Unable to connect to remote host: Connection refused"
So I checked if there is someone listening on the port, and I saw that there is but it's IP address is 0.0.0.0. When I closed the simulator, the listener was closed too, so I figured it was the simulator.
I also tried to set up the IP manually and setting my PC host's name manually, but I got the same result.

My OS: Windows 10, 64 bit

FlightGear version: 2020.3.6

cmd output:
Code (): Select all
11.71 [warn]:osg png lib warning : iccp: known incorrect srgb profile
11.90 [warn]:osg png lib warning : iccp: known incorrect srgb profile
14.23 [warn]:osg png lib warning : iccp: known incorrect srgb profile
14.25 [warn]:osg png lib warning : iccp: known incorrect srgb profile
20.80 [info]:nasal kma20 audio panel initialized
20.81 [info]:nasal hobbs system stopped
20.81 [info]:nasal hobbs system stopped
20.81 [info]:nasal starter off
20.81 [info]:nasal ki266 dme indicator #0 initialized
20.84 [info]:nasal electrical system initialized
20.89 [info]:nasal astro tech lc-2 chronometer loaded
23.03 [warn]:osg png lib warning : iccp: known incorrect srgb profile
26.25 [info]:nasal primer reset to 0
27.54 [alrt]:flight failed to save initial fdm property state
34.53 [warn]:osg png lib warning : iccp: known incorrect srgb profile
34.56 [warn]:osg png lib warning : iccp: known incorrect srgb profile
36.20 [info]:nasal garmin 196 loading cities
36.22 [warn]:osg png lib warning : iccp: known incorrect srgb profile
36.29 [warn]:osg png lib warning : iccp: known incorrect srgb profile
36.29 [warn]:osg png lib warning : iccp: known incorrect srgb profile
36.30 [warn]:osg png lib warning : iccp: known incorrect srgb profile
36.31 [warn]:osg png lib warning : iccp: known incorrect srgb profile
36.35 [warn]:osg png lib warning : iccp: known incorrect srgb profile
36.36 [warn]:osg png lib warning : iccp: known incorrect srgb profile
36.37 [warn]:osg png lib warning : iccp: known incorrect srgb profile
36.38 [warn]:osg png lib warning : iccp: known incorrect srgb profile
36.38 [warn]:osg png lib warning : iccp: known incorrect srgb profile
36.97 [info]:nasal garmin 196 loading cities done
matanNoach
 
Posts: 3
Joined: Thu Apr 01, 2021 12:01 pm

Re: IP 0 when trying to set telnet server

Postby benih » Thu Apr 01, 2021 7:36 pm

I think 0.0.0.0 is „any“ interface.
Did you try the public ip of your computer?
User avatar
benih
 
Posts: 1689
Joined: Tue Aug 15, 2017 10:34 am
Callsign: D-EBHX
Version: next
OS: Debian Linux 64bit

Re: IP 0 when trying to set telnet server

Postby matanNoach » Thu Apr 01, 2021 8:03 pm

yes. It also didn't worked
matanNoach
 
Posts: 3
Joined: Thu Apr 01, 2021 12:01 pm

Re: IP 0 when trying to set telnet server

Postby ludomotico » Thu Apr 01, 2021 11:46 pm

0.0.0.0 means “all interfaces”, localhost, Ethernet, WiFi, all of them... in an operating system.

You said you are using bash to connect to the server, but your system is windows 10

Maybe you are using telnet from WSL (i.e., a virtual machine) while running Flightgear in normal windows? If this is the case, keep in mind that the windows firewall, by default, does not allow connections from WSL to the host system. Also, the localhost in WSL is not the localhost in Windows. WSL has its own network.

If you are using WSL: configure the firewall to allow these connections from WSL to the host and use your IP in the local network, not localhost. Alternatively, use a native telnet client in Windows and not the one in WSL.

There are many examples of these configurations for many services. For example: https://serverfault.com/questions/10419 ... nside-wsl2

Tldr: I don’t think this is a problem with FlightGear, but how the WSL system works in windows by default
User avatar
ludomotico
 
Posts: 1269
Joined: Tue Apr 24, 2012 2:01 pm
Version: nightly
OS: Windows 10

Re: IP 0 when trying to set telnet server

Postby matanNoach » Fri Apr 02, 2021 6:52 am

ludomotico wrote in Thu Apr 01, 2021 11:46 pm:0.0.0.0 means “all interfaces”, localhost, Ethernet, WiFi, all of them... in an operating system.

You said you are using bash to connect to the server, but your system is windows 10

Maybe you are using telnet from WSL (i.e., a virtual machine) while running Flightgear in normal windows? If this is the case, keep in mind that the windows firewall, by default, does not allow connections from WSL to the host system. Also, the localhost in WSL is not the localhost in Windows. WSL has its own network.

If you are using WSL: configure the firewall to allow these connections from WSL to the host and use your IP in the local network, not localhost. Alternatively, use a native telnet client in Windows and not the one in WSL.

There are many examples of these configurations for many services. For example: https://serverfault.com/questions/10419 ... nside-wsl2

Tldr: I don’t think this is a problem with FlightGear, but how the WSL system works in windows by default


Thank you ludomotico!
I am using WSL and I didn't know there is a firewall issue. I found out there is a way to enable telnet client connection on windows, so after I did it worked just fine through cmd.
Thank you very much!
matanNoach
 
Posts: 3
Joined: Thu Apr 01, 2021 12:01 pm


Return to Interfacing

Who is online

Users browsing this forum: No registered users and 2 guests