Author Topic: My "Megaglest" does not appear to be in LAN  (Read 2847 times)

thiemo

  • Swordman
  • *
  • Posts: 17
    • View Profile
My "Megaglest" does not appear to be in LAN
« on: 22 October 2017, 19:11:59 »
Hi all

I wanted to play a LAN game and found my client unable to connect to the providing client that I have been able on previous occasions.

I checked our IP addresses which where were perfectly fine in the 192.168.178.0/255 range.
I hosted myself a LAN game and found Megaglest show me 62.138.239.45 and 62.138.238.45 in the top line where as the top line showed the real ip address of its client.

I tried with removing the personal Megaglest config folder (.megaglest), I re-installed Megaglest and also rebooted - all to no avail.

My partner and I both use OpenSUSE Tumbleweed, however my installation is more uptodate. So, it might be, that this issue arises because of a system update. Hoever, I also debuglogged the network of Megaglest and found some strange things:
Code: [Select]
thiemo @ lenovo-tWeed ~/.megaglest % grep -RnF 62. debug.log                                                                                                                     17-10-22 20:44
395:[2017-10-22 20:27:30] In [/home/abuild/rpmbuild/BUILD/megaglest-3.13.0/source/shared_lib/sources/platform/posix/socket.cpp::getLocalIPAddressList Line: 691] myhostaddr = [62.138.239.45]
396:[2017-10-22 20:27:30] In [/home/abuild/rpmbuild/BUILD/megaglest-3.13.0/source/shared_lib/sources/platform/posix/socket.cpp::getLocalIPAddressList Line: 691] myhostaddr = [62.138.238.45]
1034:[2017-10-22 20:27:31] In [/home/abuild/rpmbuild/BUILD/megaglest-3.13.0/source/shared_lib/sources/platform/posix/socket.cpp::getLocalIPAddressList Line: 691] myhostaddr = [62.138.239.45]
1036:[2017-10-22 20:27:31] In [/home/abuild/rpmbuild/BUILD/megaglest-3.13.0/source/shared_lib/sources/platform/posix/socket.cpp::getLocalIPAddressList Line: 691] myhostaddr = [62.138.238.45]
1245:[2017-10-22 20:27:31] In [/home/abuild/rpmbuild/BUILD/megaglest-3.13.0/source/shared_lib/sources/platform/posix/socket.cpp::getNetworkInterfaceBroadcastAddress Line: 541] ifaAddrStr [127.0.0.1], maskAddrStr [255.0.0.0], dstAddrStr[127.0.0.1], ipAddress [62.138.239.45], broadCastAddress []
1247:[2017-10-22 20:27:31] In [/home/abuild/rpmbuild/BUILD/megaglest-3.13.0/source/shared_lib/sources/platform/posix/socket.cpp::getNetworkInterfaceBroadcastAddress Line: 541] ifaAddrStr [192.168.178.73], maskAddrStr [255.255.255.0], dstAddrStr[192.168.178.255], ipAddress [62.138.239.45], broadCastAddress []
1251:[2017-10-22 20:27:31] In [/home/abuild/rpmbuild/BUILD/megaglest-3.13.0/source/shared_lib/sources/platform/posix/socket.cpp::getNetworkInterfaceBroadcastAddress Line: 541] ifaAddrStr [127.0.0.1], maskAddrStr [255.0.0.0], dstAddrStr[127.0.0.1], ipAddress [62.138.238.45], broadCastAddress []
1253:[2017-10-22 20:27:31] In [/home/abuild/rpmbuild/BUILD/megaglest-3.13.0/source/shared_lib/sources/platform/posix/socket.cpp::getNetworkInterfaceBroadcastAddress Line: 541] ifaAddrStr [192.168.178.73], maskAddrStr [255.255.255.0], dstAddrStr[192.168.178.255], ipAddress [62.138.238.45], broadCastAddress []
Line 1247 of the debug.log shows that the real ip address of my system (192.168.178.73) is not entirely unknown to my Megaglest client, making me unsure whether this still is a flaw in Megaglest. Btw, I have not been able to figure out where those public ip addresses come from. Grepping /etc or .megaglest for it showed no result.

I did a standard tumbleweed installation with
Code: [Select]
zypper install megaglestfrom
Code: [Select]
lenovo-tWeed:~ # zypper repos -u -E
Repository priorities are without effect. All enabled repositories share the same priority.

# | Alias                            | Name                            | Enabled | GPG Check | Refresh | URI                                                               
--+----------------------------------+---------------------------------+---------+-----------+---------+--------------------------------------------------------------------
1 | download.opensuse.org-non-oss    | Haupt-Repository (NON-OSS)      | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/tumbleweed/repo/non-oss/             
2 | download.opensuse.org-oss        | Haupt-Repository (OSS)          | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/tumbleweed/repo/oss/                 
3 | download.opensuse.org-tumbleweed | Hauptaktualisierungs-Repository | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/update/tumbleweed/                   
5 | packman                          | packman                         | Yes     | (r ) Yes  | Yes     | http://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Tumbleweed/

The system report shows for the OS and Megaglest version the following.
Code: [Select]
***** Operating system *********************************************************

* Distribution: openSUSE
* Release:      20171006
* Codename:     n/a
* Architecture: x86_64
* LSB support:  1

>>> uname -a
Linux lenovo-tWeed.home 4.13.4-1-default #1 SMP PREEMPT Wed Sep 27 14:20:45 UTC 2017 (4dec972) x86_64 x86_64 x86_64 GNU/Linux

>>> cat /etc/issue
Welcome to openSUSE Tumbleweed 20171006 - Kernel \r (\l).

enp3s0: \4{enp3s0} \6{enp3s0}


***** MegaGlest version ********************************************************

>>> INSTALLATION_LOCATION (def2): [/usr/bin/].

>>> ./megaglest --use-language=en --version
megaglest v3.13.0
Compiled using: GNUC: 70201 [64bit] platform: Linux-X64 endianness: little
GIT: [Rev: $5604.3a5d459$] - using STREFLOP [SSE] - [no-denormals]

Is there a work around?

Kind regards

Thiemo
« Last Edit: 22 October 2017, 19:36:45 by thiemo »

tomreyn

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: My "Megaglest" does not appear to be in LAN
« Reply #1 on: 22 October 2017, 19:55:44 »
I'm not entirely sure what happens there, yet, but your ISP hijacking your DNS queries seems to be part of the problem:

Code: [Select]
# host navigationshilfe.t-online.de
navigationshilfe.t-online.de has address 62.138.239.152
navigationshilfe.t-online.de has address 62.138.238.152

Usually, ISP who will provide such fake DNS responses on their customers' caching resolvers allow customers a way to disable the fake DNS replies. Alternatively, you could use other / open resolvers.

This website lists serveral open resolvers:
 https://www.ungefiltert-surfen.de/nameserver/de.html
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

thiemo

  • Swordman
  • *
  • Posts: 17
    • View Profile
Re: My "Megaglest" does not appear to be in LAN
« Reply #2 on: 22 October 2017, 22:13:49 »
I figure that those public ip addresses are linked to my ISP as a tracepath is really short. However, those are not the DNS my ISP provides me.
Code: [Select]
thiemo @ lenovo-tWeed ~ % tracepath 62.138.239.45                                                                                                                                 17-10-23 0:06
 1?: [LOCALHOST]                      pmtu 1500
 1:  fritz.box                                             4.170ms
 1:  fritz.box                                             1.712ms
 2:  p57A4680D.dip0.t-ipconnect.de                         1.519ms pmtu 0
 2:  send failed
     Resume: pmtu 0

Be it as may, why does Megaglest query such information or maybe why does my tWeed know such information anyway as it uses my fritz.box to send DNS queries?
Code: [Select]
thiemo @ lenovo-tWeed ~ % cat /etc/resolv.conf                                                                                                                                    17-10-23 0:06
nameserver 192.168.178.1

tomreyn

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: My "Megaglest" does not appear to be in LAN
« Reply #3 on: 22 October 2017, 22:57:06 »
I figure that those public ip addresses are linked to my ISP as a tracepath is really short. However, those are not the DNS my ISP provides me.

No, they are the A records your ISP's DNS cache returns erroneously (on purpose) when you ask them for a host which doesn't exist. i.e. if you run

Code: [Select]
host thisdomaindontexist.com
they will return those A records, then they should actualyl return 'NXDOMAIN'.

Be it as may, why does Megaglest query such information or maybe why does my tWeed know such information anyway as it uses my fritz.box to send DNS queries?
Code: [Select]
thiemo @ lenovo-tWeed ~ % cat /etc/resolv.conf                                                                                                                                    17-10-23 0:06
nameserver 192.168.178.1

Your router is just another caching nameserver, it sends requests to your ISPs caching DNS servers (and relays those back to you), which may in turn send them to other caching DNS servers until it hits the authoritative DNS servers for the object you asked for.

The reason these two IP addresses show up on MegaGlest's log will be that MG queried some hostname which does not exist. Why it did this, and which hostname that is, I do not know.
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: My "Megaglest" does not appear to be in LAN
« Reply #4 on: 22 October 2017, 23:32:05 »
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

thiemo

  • Swordman
  • *
  • Posts: 17
    • View Profile
Re: My "Megaglest" does not appear to be in LAN
« Reply #5 on: 23 October 2017, 11:16:14 »
Thanks to all. I gather, I need to compile a snapshot then and try out.

tomreyn

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: My "Megaglest" does not appear to be in LAN
« Reply #6 on: 23 October 2017, 12:51:47 »
Here's how your ISP's malicious DNS servers can be replaced by proper ones:
https://telekomhilft.telekom.de/t5/Browser/Navigationshilfe-ausschalten/td-p/2466125
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

thiemo

  • Swordman
  • *
  • Posts: 17
    • View Profile
Re: My "Megaglest" does not appear to be in LAN
« Reply #7 on: 23 October 2017, 14:43:06 »
Thx, I shall try this solution first this weekend.

thiemo

  • Swordman
  • *
  • Posts: 17
    • View Profile
Re: My "Megaglest" does not appear to be in LAN
« Reply #8 on: 10 November 2017, 00:32:46 »
Here's how your ISP's malicious DNS servers can be replaced by proper ones:
https://telekomhilft.telekom.de/t5/Browser/Navigationshilfe-ausschalten/td-p/2466125

Thanks Tom. This did the trick but funny enough, my clientdoes not show any ip adress in the lan hosted setup screen thingy as described above.

 

anything