networking – how to pause and resumeTCP packet

Hi i’m a student studying network recently.

I wanna make a router(i mean kinda router) that can filter unknown packets.
In this progress, when new TCP packets come in, i read those packet’s address, some information stuff and filter it with my standard. After filtering, filtered packets must go on(forward to origin destination).

Here comes the problem, i’m having hard time finding way to make filtered packets resume to origin destination.
I’m trying to put incoming TCP packets to specific place(in this progress incoming packet’s destination would redirect to specific place address), and redirect to origin packet’s destination.

I’m also confusing right now so i’m kinda worried that i asked properly,,,
someone knows the solution?!

networking – Cant connect to apache server on ubunu virtual machine outside the host machine

I set up an apache server on my ubuntu virtual machine, but cant connect to it outside the host machine, on my phone, outside the virtual machine etc. I dont know if I have set up everthing correctly, as this is my first time doing something like this. I have tried portforwarding port 80 and 443, though im unsure about what IP to use where. On the port forwarding page, i am asked for a server ip and an originating ip, along side the start/end ports. What IP’s should i use here?

I have also tried to disable the firewall on the host machine completely. When i try to access the server on the host machine through its static ipv4 address or localhost, it works. However i cant connect to it using that same ip on my phone etc, which is on the same network. Something tells me im using the wrong ip somewhere.

In the apache2.conf file it says “Include ports.conf” which then contains:

Listen *:80
Listen *:443

<IfModule ssl_module>
    Listen 443
</IfModule>

<IfModule mod_gnutls.c>
    Listem 443
</IfModule>

As i said, im completely new to linux and servers in general. For now, i just want my server to display a simple php page showing the current time.

networking – Where are nmcli capitalized setting stored and how can I modify them?

I have a VM and I’m playing with nmcli on CentOS 8

nmcli shows a couple addresses which I added. I was able to remove the .106 address from the ipv4.addresses, but not from the capitalized configuration (I don’t know what the capitalized component config is called).

$ nmcli connection show enp0s8
...
ipv4.addresses:                         192.168.56.107/24
...
IP4.ADDRESS(1):                         192.168.56.107/24
IP4.ADDRESS(2):                         192.168.56.106/24

nmcli still shows both addresses are active

$ nmcli
enp0s8: connected to enp0s8
"Intel 82540EM"
ethernet (e1000), 08:00:27:42:77:8C, hw, mtu 1500
inet4 192.168.56.107/24
inet4 192.168.56.106/24
route4 192.168.56.0/24
route4 192.168.56.0/24
route4 192.168.56.0/24
inet6 fe80::f3b6:f5e9:b207:49a1/64
route6 fe80::/64
route6 ff00::/8

As does ip route

$ ip address show enp0s8
3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 08:00:27:42:77:8c brd ff:ff:ff:ff:ff:ff
inet 192.168.56.106/24 brd 192.168.56.255 scope global dynamic noprefixroute enp0s8
   valid_lft 333sec preferred_lft 333sec
inet 192.168.56.107/24 brd 192.168.56.255 scope global secondary noprefixroute enp0s8
   valid_lft forever preferred_lft forever
inet6 fe80::f3b6:f5e9:b207:49a1/64 scope link noprefixroute
   valid_lft forever preferred_lft forever

The configuration does not appear in the network scripts

$ egrep "106" /etc/sysconfig/network-scripts/*
$

My question, with this context is, where is the capitalized config stored and how can I modify it?

networking – Details about League of Legends netcode

I have been comparing the netcode differences of different games and genres.

There are lots of materials online for many games. Here are some examples: Starcraft II, Dota 2, CS, Overwatch, Valorant.

I couldn’t found any information around League of Legends netcode. Can anyone provide a document about this topic or directly compare the approaches with the other games?

Does it use a client prediction/rollback mechanism? Movement prediction seems to be configurable. What about the other stuff, are they predictive by default or do they wait for server response?

networking – Home network including Mac mini as DNS and DHCP server

enter image description here

As the sketch suggests, I’m trying to design a home network using a Mac mini as a DNS and DHCP server. My idea is to have the ISP router only act as Gateway to the internet. Since the Mac mini only has one ethernet connection, I was thinking to put a switch between the ISP router and Mac + Ubiquiti AP.

My question is, could a configuration like the above work? Or would I require some other configuration? I do not want the wireless devices to get IPs from the ISP router. I have disabled the Wifi on that one as well. How can I make sure that the AP hands out IPs on the Mac’s subnet and not on the ISP router’s subnet?

Thanks in advance!

networking – How to solve MYSQL Server not accepting the connections from remote server after restoring the server from Amazon Backup AMI?

Here are the details:

# cat /etc/release

    DISTRIB_ID=Ubuntu
    DISTRIB_RELEASE=20.04
    DISTRIB_CODENAME=focal
    DISTRIB_DESCRIPTION="Ubuntu 20.04.1 LTS"
    NAME="Ubuntu"
    VERSION="20.04.1 LTS (Focal Fossa)"
    ID=ubuntu
    ID_LIKE=debian
    PRETTY_NAME="Ubuntu 20.04.1 LTS"
    VERSION_ID="20.04"
    HOME_URL="https://www.ubuntu.com/"
    SUPPORT_URL="https://help.ubuntu.com/"
    BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
    PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
    VERSION_CODENAME=focal
    UBUNTU_CODENAME=focal

# mysqld –version


    /usr/sbin/mysqld  Ver 8.0.22-0ubuntu0.20.04.2 for Linux on x86_64 ((Ubuntu))

root@XXXXXXX:~# cat /etc/mysql/mysql.conf.d/mysqld.cnf | grep --color bind

bind-address            = 0.0.0.0

Mysql Service Status:

root@XXXXXXX:~# systemctl status mysql.service
● mysql.service - MySQL Community Server
     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2021-03-02 12:54:00 UTC; 1h 12min ago
    Process: 31460 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
   Main PID: 31484 (mysqld)
     Status: "Server is operational"
      Tasks: 40 (limit: 2372)
     Memory: 356.6M
     CGroup: /system.slice/mysql.service
             └─31484 /usr/sbin/mysqld

Mar 02 12:53:59 ip-192-168-1-115 systemd(1): Starting MySQL Community Server...
Mar 02 12:54:00 ip-192-168-1-115 systemd(1): Started MySQL Community Server.

root@XXXXXXX:~# tail -100 /var/log/mysql/mysql.log

/usr/sbin/mysqld, Version: 8.0.22-0ubuntu0.20.04.2 ((Ubuntu)). started with:
Tcp port: 3306  Unix socket: /var/run/mysqld/mysqld.sock
Time                 Id Command    Argument
2021-03-02T12:53:51.185036Z        12 Query     FLUSH PRIVILEGES
2021-03-02T12:53:54.040659Z        12 Quit

root@XXXXXXX:~# tail -25 /var/log/mysql/error.log

2021-03-02T11:48:38.852882Z 1 (System) (MY-013577) (InnoDB) InnoDB initialization has ended.
2021-03-02T11:48:38.993865Z 0 (System) (MY-011323) (Server) X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2021-03-02T11:48:39.083889Z 0 (Warning) (MY-010068) (Server) CA certificate ca.pem is self signed.
2021-03-02T11:48:39.084070Z 0 (System) (MY-013602) (Server) Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2021-03-02T11:48:39.110064Z 0 (System) (MY-010931) (Server) /usr/sbin/mysqld: ready for connections. Version: '8.0.22-0ubuntu0.20.04.2'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Ubuntu).
2021-03-02T12:16:18.763905Z 137 (ERROR) (MY-013134) (Server) Table './flash@002dfast@002dprod@002ddb/videos' is marked as crashed and should be repaired
2021-03-02T12:16:18.765400Z 137 (Warning) (MY-010756) (Server) Checking table:   './flash@002dfast@002dprod@002ddb/videos'
2021-03-02T12:38:29.704195Z 0 (System) (MY-013172) (Server) Received SHUTDOWN from user <via user signal>. Shutting down mysqld (Version: 8.0.22-0ubuntu0.20.04.2).
2021-03-02T12:38:31.195350Z 0 (System) (MY-010910) (Server) /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.22-0ubuntu0.20.04.2)  (Ubuntu).
2021-03-02T12:38:31.627975Z 0 (System) (MY-010116) (Server) /usr/sbin/mysqld (mysqld 8.0.22-0ubuntu0.20.04.2) starting as process 31217
2021-03-02T12:38:31.637190Z 1 (System) (MY-013576) (InnoDB) InnoDB initialization has started.
2021-03-02T12:38:31.975618Z 1 (System) (MY-013577) (InnoDB) InnoDB initialization has ended.
2021-03-02T12:38:32.112947Z 0 (System) (MY-011323) (Server) X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2021-03-02T12:38:32.200447Z 0 (Warning) (MY-010068) (Server) CA certificate ca.pem is self signed.
2021-03-02T12:38:32.200629Z 0 (System) (MY-013602) (Server) Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2021-03-02T12:38:32.233977Z 0 (System) (MY-010931) (Server) /usr/sbin/mysqld: ready for connections. Version: '8.0.22-0ubuntu0.20.04.2'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Ubuntu).
2021-03-02T12:53:58.504425Z 0 (System) (MY-013172) (Server) Received SHUTDOWN from user <via user signal>. Shutting down mysqld (Version: 8.0.22-0ubuntu0.20.04.2).
2021-03-02T12:53:59.610387Z 0 (System) (MY-010910) (Server) /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.22-0ubuntu0.20.04.2)  (Ubuntu).
2021-03-02T12:54:00.048268Z 0 (System) (MY-010116) (Server) /usr/sbin/mysqld (mysqld 8.0.22-0ubuntu0.20.04.2) starting as process 31484
2021-03-02T12:54:00.058643Z 1 (System) (MY-013576) (InnoDB) InnoDB initialization has started.
2021-03-02T12:54:00.443835Z 1 (System) (MY-013577) (InnoDB) InnoDB initialization has ended.
2021-03-02T12:54:00.581426Z 0 (System) (MY-011323) (Server) X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2021-03-02T12:54:00.665735Z 0 (Warning) (MY-010068) (Server) CA certificate ca.pem is self signed.
2021-03-02T12:54:00.665956Z 0 (System) (MY-013602) (Server) Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2021-03-02T12:54:00.693806Z 0 (System) (MY-010931) (Server) /usr/sbin/mysqld: ready for connections. Version: '8.0.22-0ubuntu0.20.04.2'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Ubuntu).
root@ABCXYZ:~# mysql -u'phpmyadmin' -p -h192.168.1.115 -P3306
Enter password:
ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.1.115' (110)
root@ABCXYZ:~#

Using exactly the same command from the mysql server (i.e. in this hashed out as XXXXXXX) & it works fine and we are able to connect:

root@XXXXXXX:~# mysql -u’phpmyadmin’ -p -h192.168.1.115 -P3306

I also did packet capture on the "" to ensure that there is no connectivity issue from ""
root@ip-172-31-32-115:~# tcpdump -n host 192.168.1.188
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes



12:43:19.631926 IP 192.168.1.188.47250 > 192.168.1.115.3306: Flags (S), seq 945902876, win 62727, options (mss 8961,sackOK,TS val 1425290709 ecr 0,nop,wscale 7), length 0
12:43:20.649648 IP 192.168.1.188.47250 > 192.168.1.115.3306: Flags (S), seq 945902876, win 62727, options (mss 8961,sackOK,TS val 1425291727 ecr 0,nop,wscale 7), length 0
12:43:22.665634 IP 192.168.1.188.47250 > 192.168.1.115.3306: Flags (S), seq 945902876, win 62727, options (mss 8961,sackOK,TS val 1425293743 ecr 0,nop,wscale 7), length 0
12:43:26.889674 IP 192.168.1.188.47250 > 192.168.1.115.3306: Flags (S), seq 945902876, win 62727, options (mss 8961,sackOK,TS val 1425297967 ecr 0,nop,wscale 7), length 0
12:43:35.081803 IP 192.168.1.188.47250 > 192.168.1.115.3306: Flags (S), seq 945902876, win 62727, options (mss 8961,sackOK,TS val 1425306159 ecr 0,nop,wscale 7), length 0
12:43:51.209876 IP 192.168.1.188.47250 > 192.168.1.115.3306: Flags (S), seq 945902876, win 62727, options (mss 8961,sackOK,TS val 1425322287 ecr 0,nop,wscale 7), length 0
^C
6 packets captured
6 packets received by filter
0 packets dropped by kernel

networking – equivalent of –net=host in dockerfile when creating docker container

I trieddocker run --net=host -d --name pdns-recursor pschiffe/pdns-recursor and it works. Now my goal is to use dockerfile to pass some environment without errors.

I tried:

networks:
  name: host

and

networks:
  name: "host"

and also the examples indicated here.

I always get an The Compose file './docker-compose.yml' is invalid because: services.recursor.networks.name contains an invalid type, it should be an object, or a null.

Any suggestions are much appreciated.

networking – Where is network data stored while awaiting to be written to disk?

I think download rates may depend on these 3 factors: the Network Infrastructure (router, VPN, network card, towers), the RAM or cache, the Final Storage (HDD or SDD or whatnot).

So we take this as an example: I have a very slow HDD Drive and very slow RAM but a very fast network adapter & router.

When downloading, for example, a Linux Live ISO, the adapter will download it fast but yet all content that is downloaded is not written to disk immediately.

So my plausible solutions would be:

  1. The Internet Stack (TCP/IP or whatever) allow clients to defer receiving network packets. So that a client could say to aserver directly: Yo, I’m still struggling with the data I received, would you mind sending me the next data after (when I tell you to do so).
  2. A software library pauses receiving data when struggling.
  3. Data is stored somewhere else (other than cache or RAM) (maybe on the router?)

Is there a one real answer or it depends?