0

My network issues first started when I got a DNS error, so I started trying to change my DNS server to Cloudflare/Google DNS. I started reading how to do this and I found that latest Ubuntu releases use Netplan.

Configs for Netplan are stored in /etc/netplan/, but when I looked into this folder, I found that there was only one file and this file was called 00-install.yml or something like that. After searching and testing some things I found that my networking isn't using /etc/network/interfaces (this file was empty/non-existing), and I just started creating new Netplan config.

After a big amount of restarts and typing without screen, I got it to working. DNS still didn't work in most of applications, and googling again I found that I have to change /etc/resolv.conf symlink?????? It is strange, but I did this and now DNS in resolv.conf is equals to that in my Netplan config (/etc/netplan/01-cfg.yml), and all worked great.

Until I tried downloading LinuxGSM server. ./gmodserver install command starts with downloading some shell scripts one by one from Github (or Bitbucket on fail, uses CURL for both), and it started downloading, then some scripts failed to download and script failed. After re-running the command more than 20 times and rebooting, script was finally working.

From this moment network problems got worse. Ping and curl mostly stopped working. I found one answer that said to try telneting to Google and it worked, but slow. I tried to fix this issue: using DHCP/static ip, changing ip, changing nameservers, removing nameserver options, switched from Netplan to ifupdown (/etc/network/interfaces).

What I have currently:

Ubuntu 20.04.4 LTS x86_64, ifupdown networking, UFW disabled, Cloudflare DNS, Ping dropping packets randomly:

stopper@stopperls:~$ ping [Ubuntu Changelogs]
PING [Ubuntu Changelogs] 56(84) bytes of data.
64 bytes from amyrose.canonical.com: icmp_seq=1 ttl=53 time=168 ms
# ... worked another 12 times
^C
--- [Ubuntu Changelogs] ping statistics ---
19 packets transmitted, 13 received, 31.5789% packet loss, time 18131ms
rtt min/avg/max/mdev = 166.969/167.842/168.108/0.275 ms
# It's starting fine, but then stops working:
stopper@stopperls:~$ ping [Ubuntu Changelogs]
PING [Ubuntu Changelogs] 56(84) bytes of data.
^C
--- [Ubuntu Changelogs] ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1014ms
# Tried disabling IPv6 (already disabled in some sysctl file but this file is looks like ignored for some reason):
stopper@stopperls:~$ sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
[sudo] password for stopper: 
net.ipv6.conf.all.disable_ipv6 = 1
stopper@stopperls:~$ sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
net.ipv6.conf.default.disable_ipv6 = 1
stopper@stopperls:~$ ping [Ubuntu Changelogs]
PING [Ubuntu Changelogs] (185.125.190.17) 56(84) bytes of data.
^C
--- [Ubuntu Changelogs] ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3052ms
# And it started working for a little bit again:
stopper@stopperls:~$ ping [Ubuntu Changelogs]
PING [Ubuntu Changelogs] 56(84) bytes of data.
# ... worked another 8 times
^C
--- [Ubuntu Changelogs] ping statistics ---
16 packets transmitted, 8 received, 50% packet loss, time 15162ms
rtt min/avg/max/mdev = 166.739/167.794/168.258/0.418 ms

On SSH connection, I get Failed to connect to [Ubuntu Changelogs]/meta-release-lts. Check your Internet connection or proxy settings

Curling [Google] is breaking some times:

stopper@stopperls:~$ curl [Google]
curl: (56) Recv failure: Connection reset by peer
stopper@stopperls:~$ curl [Google]
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="[Google]">here</A>.
</BODY></HTML>
# ... worked another 5 times
stopper@stopperls:~$ curl [Google]
# Was frozen for a minute+
curl: (7) Failed to connect to [Google] port 80: Connection timed out
stopper@stopperls:~$ curl [Google]
curl: (56) Recv failure: Connection reset by peer

enp4s0 is main interface - on-board Realtek RTL8111D

04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 03)
        Subsystem: Gigabyte Technology Co., Ltd Onboard Ethernet
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 31
        Region 0: I/O ports at ee00 [size=256]
        Region 2: Memory at fbcff000 (64-bit, prefetchable) [size=4K]
        Region 4: Memory at fbcf8000 (64-bit, prefetchable) [size=16K]
        Expansion ROM at fbd00000 [virtual] [disabled] [size=128K]
        Capabilities: [40] Power Management version 3
                Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
                Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
                Address: 00000000fee08004  Data: 4024
        Capabilities: [70] Express (v2) Endpoint, MSI 01
                DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s <512ns, L1 <64us
                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset- SlotPowerLimit 10.000W
                DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
                        RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-
                        MaxPayload 128 bytes, MaxReadReq 4096 bytes
                DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend-
                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <512ns, L1 <64us
                        ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s (ok), Width x1 (ok)
                        TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
                DevCap2: Completion Timeout: Not Supported, TimeoutDis+, NROPrPrP-, LTR-
                         10BitTagComp-, 10BitTagReq-, OBFF Not Supported, ExtFmt-, EETLPPrefix-
                         EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
                         FRS-, TPHComp-, ExtTPHComp-
                         AtomicOpsCap: 32bit- 64bit- 128bitCAS-
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled
                         AtomicOpsCtl: ReqEn-
                LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance De-emphasis: -6dB
                LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete-, EqualizationPhase1-
                         EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
        Capabilities: [ac] MSI-X: Enable- Count=4 Masked-
                Vector table: BAR=4 offset=00000000
                PBA: BAR=4 offset=00000800
        Capabilities: [cc] Vital Product Data
pcilib: sysfs_read_vpd: read failed: Input/output error
                Not readable
        Capabilities: [100 v1] Advanced Error Reporting
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
                UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr-
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
                AERCap: First Error Pointer: 00, ECRCGenCap+ ECRCGenEn- ECRCChkCap+ ECRCChkEn-
                        MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
                HeaderLog: 00000000 00000000 00000000 00000000
        Capabilities: [140 v1] Virtual Channel
                Caps:   LPEVC=0 RefClk=100ns PATEntryBits=1
                Arb:    Fixed- WRR32- WRR64- WRR128-
                Ctrl:   ArbSelect=Fixed
                Status: InProgress-
                VC0:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
                        Arb:    Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
                        Ctrl:   Enable+ ID=0 ArbSelect=Fixed TC/VC=ff
                        Status: NegoPending- InProgress-
        Capabilities: [160 v1] Device Serial Number 03-00-00-00-68-4c-e0-00
        Kernel driver in use: r8168
        Kernel modules: r8168

route -n:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.32.1    0.0.0.0         UG    0      0        0 enp4s0
172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0
172.18.0.0      0.0.0.0         255.255.0.0     U     0      0        0 br-44b6209c823e
172.19.0.0      0.0.0.0         255.255.0.0     U     0      0        0 br-ec985c658a3b
172.20.0.0      0.0.0.0         255.255.0.0     U     0      0        0 br-50806f0cc08b
172.21.0.0      0.0.0.0         255.255.0.0     U     0      0        0 br-8d4bdd62462b
192.168.32.0    0.0.0.0         255.255.255.0   U     0      0        0 enp4s0
192.168.32.0    0.0.0.0         255.255.255.0   U     0      0        0 br-c709a7686d7e

ifconfig:

br-44b6209c823e: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.18.0.1  netmask 255.255.0.0  broadcast 172.18.255.255
        ether 02:42:3c:4f:7a:1a  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-50806f0cc08b: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.20.0.1  netmask 255.255.0.0  broadcast 172.20.255.255
        ether 02:42:5b:90:b1:1a  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-8d4bdd62462b: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.21.0.1  netmask 255.255.0.0  broadcast 172.21.255.255
        ether 02:42:ff:b3:27:4c  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-c709a7686d7e: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.32.1  netmask 255.255.255.0  broadcast 192.168.32.255
        ether 02:42:bb:26:20:58  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-ec985c658a3b: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.19.0.1  netmask 255.255.0.0  broadcast 172.19.255.255
        ether 02:42:90:ae:ea:6b  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

docker0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        ether 02:42:e7:47:61:e2  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 53  bytes 8827 (8.8 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp4s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.32.108  netmask 255.255.255.0  broadcast 192.168.32.255
        ether 1c:6f:65:21:0c:cb  txqueuelen 1000  (Ethernet)
        RX packets 354430  bytes 21343825 (21.3 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2036  bytes 137535 (137.5 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0 # note that 0 dropped
        device interrupt 31  base 0xd000  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 86  bytes 6220 (6.2 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 86  bytes 6220 (6.2 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

veth050959f: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 5e:ea:3a:8b:e8:61  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 53  bytes 8827 (8.8 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ip a:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: enp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 1c:6f:65:21:0c:cb brd ff:ff:ff:ff:ff:ff
    inet 192.168.32.108/24 brd 192.168.32.255 scope global enp4s0
       valid_lft forever preferred_lft forever
3: br-50806f0cc08b: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 02:42:5b:90:b1:1a brd ff:ff:ff:ff:ff:ff
    inet 172.20.0.1/16 brd 172.20.255.255 scope global br-50806f0cc08b
       valid_lft forever preferred_lft forever
4: br-8d4bdd62462b: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 02:42:ff:b3:27:4c brd ff:ff:ff:ff:ff:ff
    inet 172.21.0.1/16 brd 172.21.255.255 scope global br-8d4bdd62462b
       valid_lft forever preferred_lft forever
5: docker0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default 
    link/ether 02:42:e7:47:61:e2 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever
6: br-c709a7686d7e: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 02:42:bb:26:20:58 brd ff:ff:ff:ff:ff:ff
    inet 192.168.32.1/24 brd 192.168.32.255 scope global br-c709a7686d7e
       valid_lft forever preferred_lft forever
7: br-ec985c658a3b: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 02:42:90:ae:ea:6b brd ff:ff:ff:ff:ff:ff
    inet 172.19.0.1/16 brd 172.19.255.255 scope global br-ec985c658a3b
       valid_lft forever preferred_lft forever
8: br-44b6209c823e: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 02:42:3c:4f:7a:1a brd ff:ff:ff:ff:ff:ff
    inet 172.18.0.1/16 brd 172.18.255.255 scope global br-44b6209c823e
       valid_lft forever preferred_lft forever
10: veth050959f@if9: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master docker0 state UP group default 
    link/ether 5e:ea:3a:8b:e8:61 brd ff:ff:ff:ff:ff:ff link-netnsid 0

cat /etc/network/interfaces:

stopper@stopperls:~$ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

# The loopback network interface
auto lo
iface lo inet loopback

allow-hotplug enp4s0
auto enp4s0
iface enp4s0 inet static
  address 192.168.32.108
  netmask 255.255.255.0
  broadcast 192.168.32.255
  gateway 192.168.32.1
  dns-nameservers 1.1.1.1 1.0.0.1

Also no proxy:

stopper@stopperls:~$ echo "$http_proxy"

stopper@stopperls:~$ echo "$https_proxy"

stopper@stopperls:~$ echo "$all_proxy"

stopper@stopperls:~$

On Manjaro machine CURL works perfectly, PING too (and just generally I doesn't have any network issues on my Manjaro PC, DNS server is Auto (so probably not Cloudflare/Google DNS, and probably this is that DNS what had problems on Ubuntu Server))

1 Answer 1

0

After a big amount of restarts and typing without screen, I got it to working. DNS still didn't work in most of applications, and googling again I found that I have to change /etc/resolv.conf symlink?????? It is strange, but I did this and now DNS in resolv.conf is equals to that in my Netplan config (/etc/netplan/01-cfg.yml), and all worked great.

Until I tried downloading LinuxGSM server. ./gmodserver install command starts with downloading some shell scripts one by one from Github (or Bitbucket on fail, uses CURL for both), and it started downloading, then some scripts failed to download and script failed. After re-running the command more than 20 times and rebooting, script was finally working.

From this moment network problems got worse. Ping and curl mostly stopped working. I found one answer that said to try telneting to Google and it worked, but slow. I tried to fix this issue: using DHCP/static ip, changing ip, changing nameservers, removing nameserver options, switched from Netplan to ifupdown (/etc/network/interfaces).

Judging from the website for LinuxGSM, which says that it is "the command-line tool for quick, simple deployment and management of Linux dedicated game servers" and is "Written in BASH," my initial gut reaction is that the various scripts you mentioned that were failing when you can ./gmodserver install are not idempotent --idempotency is hard to do with normal languages; bash even more so-- and have left your system in a wonky state.

The documentation for gmodserver specifically mentions some dependencies:

Before installing, you must ensure you have all the dependencies required to run gmodserver.

For Ubuntu =< 20.04 --which your aforementioned Ubuntu version matches-- you must first install dependencies with this command:

sudo dpkg --add-architecture i386; sudo apt update; sudo apt install curl wget file tar bzip2 gzip unzip bsdmainutils python3 util-linux ca-certificates binutils bc jq tmux netcat lib32gcc1 lib32stdc++6 libsdl2-2.0-0:i386 steamcmd libtinfo5:i386

There's some indication later in the documentation that the installation script can try to do this automatically though:

It is possible for LinuxGSM to install dependencies either by having the gmodserver user account with sudo access or running the installer as root.

The documentation also has Installation Steps to follow once the dependencies are installed (or if the gmodserver user account has sudo access, or if the installer is run as root):

From the command-line do the following. Ensuring you have also installed the required dependencies.

  1. Create a user and login.

adduser gmodserver

(For security best practice, ensure you set a strong password. Random password: TcyMjY0MjM3M)

su - gmodserver

  1. Download linuxgsm.sh.

wget -O linuxgsm.sh https://linuxgsm.sh && chmod +x linuxgsm.sh && bash linuxgsm.sh gmodserver

  1. Run the installer following the on-screen instructions.

./gmodserver install

So there are a couple questions here:

  1. Were the dependencies properly handled? Either by installing them beforehand, or by either ensuring that the gmodserver user had sudo rights or that the ./gmodserver install command was run as root?
  2. Were the first and second steps of the installation instructions followed? I.e., was the gmodserver user added, then logged into with su - gmodserver, then run wget -O linuxgsm.sh https://linuxgsm.sh && chmod +x linuxgsm.sh && bash linuxgsm.sh gmodserver and then run ./gmodserver install?
2
  • My main problem is network issues, LinuxGSM just was the first thing where I noticed them, and there might be a chance that this issues is because of LGSM. I installed all dependencies but script downloading was failing. Sorry if I mislead you.
    – Stopper
    Commented Apr 9, 2022 at 7:03
  • No worries. You made note of the lack of TX errors on the main interface. If you mtr out to google.com or some other domain, what do the results look like after a few minutes? It sounds like there might be a network problem between your host and the broader internet, and an mtr that shows problems within your hosting network and none outside it is a good indication for your hosting network to start investigating. (example command: mtr -4 www.google.com) Commented Apr 10, 2022 at 0:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .