root@fastAPI:~# iptables -L -v -n --line-numbers
Chain INPUT (policy ACCEPT 623 packets, 305K bytes)
num pkts bytes target prot opt in out source destination
1 5 420 DROP 0 -- vmbr1 * 0.0.0.0/0 10.0.0.0/8
2 0 0 DROP 0 -- * * 103.245.236.0/24 0.0.0.0/0
3 0 0 DROP 0 -- * * 190.103.60.0/24 0.0.0.0/0
Chain FORWARD (policy ACCEPT 248 packets, 33249 bytes)
num pkts bytes target prot opt in out source destination
1 0 0 DROP 0 -- vmbr1 * 0.0.0.0/0 10.0.0.1
Chain OUTPUT (policy ACCEPT 596 packets, 299K bytes)
num pkts bytes target prot opt in out source destination
root@fastAPI:~# iptables -D INPUT 1
root@fastAPI:~# iptables -L -v -n --line-numbers
Chain INPUT (policy ACCEPT 7 packets, 404 bytes)
num pkts bytes target prot opt in out source destination
1 0 0 DROP 0 -- * * 103.245.236.0/24 0.0.0.0/0
2 0 0 DROP 0 -- * * 190.103.60.0/24 0.0.0.0/0
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
num pkts bytes target prot opt in out source destination
1 0 0 DROP 0 -- vmbr1 * 0.0.0.0/0 10.0.0.1
Chain OUTPUT (policy ACCEPT 5 packets, 468 bytes)
num pkts bytes target prot opt in out source destination
root@fastAPI:~# iptables -D FORWARD 1
root@fastAPI:~# iptables -L -v -n --line-numbers
Chain INPUT (policy ACCEPT 34 packets, 15912 bytes)
num pkts bytes target prot opt in out source destination
1 0 0 DROP 0 -- * * 103.245.236.0/24 0.0.0.0/0
2 0 0 DROP 0 -- * * 190.103.60.0/24 0.0.0.0/0
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
num pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 30 packets, 15220 bytes)
num pkts bytes target prot opt in out source destination
# Generated by iptables-save v1.8.9 on Fri Jan 19 01:36:33 2024
*filter
:INPUT ACCEPT [83:12097]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [87:12557]
-A INPUT -d 10.0.0.0/8 -i vmbr1 -j DROP
-A INPUT -s 103.245.236.0/24 -j DROP
-A INPUT -s 190.103.60.0/24 -j DROP
-A FORWARD -d 10.0.0.1/32 -i vmbr1 -j DROP
COMMIT
# Completed on Fri Jan 19 01:36:33 2024
# Generated by iptables-save v1.8.9 on Fri Jan 19 01:36:33 2024
*raw
:PREROUTING ACCEPT [2751:522704]
:OUTPUT ACCEPT [3023:520429]
COMMIT
# Completed on Fri Jan 19 01:36:33 2024
# Generated by iptables-save v1.8.9 on Fri Jan 19 01:36:33 2024
*nat
:PREROUTING ACCEPT [5:822]
:INPUT ACCEPT [2:706]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
-A PREROUTING -d 10.0.0.2/32 -p tcp -m tcp --dport 80 -j DNAT --to-destination 10.1.0.2:80
-A PREROUTING -d 10.0.0.2/32 -p tcp -m tcp --dport 443 -j DNAT --to-destination 10.1.0.2:443
-A PREROUTING -d 10.0.0.2/32 -p tcp -m tcp --dport 40100 -j DNAT --to-destination 10.1.0.2:22
-A PREROUTING -d 10.0.0.2/32 -p tcp -m tcp --dport 40102 -j DNAT --to-destination 10.1.0.4:22
-A PREROUTING -d 10.0.0.2/32 -p tcp -m tcp --dport 40103 -j DNAT --to-destination 10.1.0.5:22
-A PREROUTING -d 10.0.0.2/32 -p tcp -m tcp --dport 40104 -j DNAT --to-destination 10.1.0.6:22
-A PREROUTING -d 10.0.0.2/32 -p tcp -m tcp --dport 40105 -j DNAT --to-destination 10.1.0.7:22
-A POSTROUTING -s 10.1.0.0/16 -o vmbr0 -j MASQUERADE
-A POSTROUTING -s 10.1.0.0/16 -o tun0 -j MASQUERADE
COMMIT
# Completed on Fri Jan 19 01:36:33 2024
-A INPUT -d 10.0.0.0/8 -i vmbr1 -j DROP
root@gitlab-runner:/home/gitlab-runner-user# docker run --rm -it alpine ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN 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
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
58: eth0@if59: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue state UP
link/ether 02:42:ac:1a:00:02 brd ff:ff:ff:ff:ff:ff
inet 172.26.0.2/16 brd 172.26.255.255 scope global eth0
valid_lft forever preferred_lft forever
root@gitlab-runner:/home/gitlab-runner-user# 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: ens18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether bc:24:11:53:8b:9f brd ff:ff:ff:ff:ff:ff
altname enp0s18
inet 10.1.0.5/16 brd 10.1.255.255 scope global ens18
valid_lft forever preferred_lft forever
3: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 02:42:d6:46:d3:4f brd ff:ff:ff:ff:ff:ff
inet 172.26.0.1/16 brd 172.26.255.255 scope global docker0
valid_lft forever preferred_lft forever
root@gitlab-runner:/home/gitlab-runner-user# docker run --rm -it --name network-test alpine nslookup gitlab.com 8.8.8.8
Server: 8.8.8.8
Address: 8.8.8.8:53
Non-authoritative answer:
Name: gitlab.com
Address: 2606:4700:90:0:f22e:fbec:5bed:a9b9
Non-authoritative answer:
Name: gitlab.com
Address: 172.65.251.78
root@gitlab-runner:/home/gitlab-runner-user# tcpdump -i any dst 8.8.8.8
tcpdump: data link type LINUX_SLL2
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on any, link-type LINUX_SLL2 (Linux cooked v2), snapshot length 262144 bytes
22:12:30.022098 vethba937da P IP 172.26.0.2.40769 > dns.google.domain: 28331+ A? gitlab.com. (28)
22:12:30.022099 docker0 In IP 172.26.0.2.40769 > dns.google.domain: 28331+ A? gitlab.com. (28)
22:12:30.022117 ens18 Out IP 10.1.0.5.40769 > dns.google.domain: 28331+ A? gitlab.com. (28)
22:12:30.022126 ? P IP 172.26.0.2.40769 > dns.google.domain: 28695+ AAAA? gitlab.com. (28)
22:12:30.022126 docker0 In IP 172.26.0.2.40769 > dns.google.domain: 28695+ AAAA? gitlab.com. (28)
22:12:30.022129 ens18 Out IP 10.1.0.5.40769 > dns.google.domain: 28695+ AAAA? gitlab.com. (28)
root@gitlab-runner:/home/gitlab-runner-user# docker run --rm -it --name network-test alpine nslookup gitlab.com
Server: 10.29.4.1
Address: 10.29.4.1:53
Non-authoritative answer:
Name: gitlab.com
Address: 10.30.0.13
** server can't find gitlab.com: REFUSED
root@gitlab-runner:/home/gitlab-runner-user# docker run --rm -it --name network-test alpine ping gitlab.com
ping: bad address 'gitlab.com'
root@gitlab-runner:/home/gitlab-runner-user# tcpdump -i any dst 10.29.4.1
tcpdump: data link type LINUX_SLL2
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on any, link-type LINUX_SLL2 (Linux cooked v2), snapshot length 262144 bytes
22:11:03.991145 veth4a3d536 P IP 172.26.0.2.55984 > 10.29.4.1.domain: 64697+ A? gitlab.com. (28)
22:11:03.991145 docker0 In IP 172.26.0.2.55984 > 10.29.4.1.domain: 64697+ A? gitlab.com. (28)
22:11:03.991168 ens18 Out IP 10.1.0.5.55984 > 10.29.4.1.domain: 64697+ A? gitlab.com. (28)
22:11:03.991183 ? P IP 172.26.0.2.55984 > 10.29.4.1.domain: 65137+ AAAA? gitlab.com. (28)
22:11:03.991183 docker0 In IP 172.26.0.2.55984 > 10.29.4.1.domain: 65137+ AAAA? gitlab.com. (28)
22:11:03.991187 ens18 Out IP 10.1.0.5.55984 > 10.29.4.1.domain: 65137+ AAAA? gitlab.com. (28)
22:11:04.018371 ens18 Out IP 10.1.0.5.50253 > 10.29.4.1.domain: 53915+ PTR? 1.4.29.10.in-addr.arpa. (40)
22:11:04.112107 ens18 Out IP 10.1.0.5.53374 > 10.29.4.1.domain: 118+ PTR? 2.0.26.172.in-addr.arpa. (41)
22:11:04.659340 ens18 Out IP 10.1.0.5.42871 > 10.29.4.1.domain: 11191+ PTR? 5.0.1.10.in-addr.arpa. (39)
22:11:14.798821 veth66ffdf7 P IP 172.26.0.2.42441 > 10.29.4.1.domain: 37109+ A? gitlab.com. (28)
22:11:14.798822 docker0 In IP 172.26.0.2.42441 > 10.29.4.1.domain: 37109+ A? gitlab.com. (28)
22:11:14.798841 ens18 Out IP 10.1.0.5.42441 > 10.29.4.1.domain: 37109+ A? gitlab.com. (28)
22:11:14.798849 veth66ffdf7 P IP 172.26.0.2.42441 > 10.29.4.1.domain: 37379+ AAAA? gitlab.com. (28)
22:11:14.798850 docker0 In IP 172.26.0.2.42441 > 10.29.4.1.domain: 37379+ AAAA? gitlab.com. (28)
22:11:14.798852 ens18 Out IP 10.1.0.5.42441 > 10.29.4.1.domain: 37379+ AAAA? gitlab.com. (28)
22:11:17.301712 veth66ffdf7 P IP 172.26.0.2.42441 > 10.29.4.1.domain: 37379+ AAAA? gitlab.com. (28)
22:11:17.301715 docker0 In IP 172.26.0.2.42441 > 10.29.4.1.domain: 37379+ AAAA? gitlab.com. (28)
22:11:17.301729 ens18 Out IP 10.1.0.5.42441 > 10.29.4.1.domain: 37379+ AAAA? gitlab.com. (28)
root@gitlab-runner:/home/gitlab-runner-user# curl gitlab.com
<html>
<head><title>301 Moved Permanently</title></head>
<body>
<center><h1>301 Moved Permanently</h1></center>
<hr><center>cloudflare</center>
</body>
</html>
root@gitlab-runner:/home/gitlab-runner-user# nslookup gitlab.com
Server: 10.29.4.1
Address: 10.29.4.1#53
Non-authoritative answer:
Name: gitlab.com
Address: 10.30.0.13
** server can't find gitlab.com: REFUSED
root@gitlab-runner:/home/gitlab-runner-user# tcpdump -i any dst 10.29.4.1
tcpdump: data link type LINUX_SLL2
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on any, link-type LINUX_SLL2 (Linux cooked v2), snapshot length 262144 bytes
22:09:50.543316 ens18 Out IP 10.1.0.5.56870 > 10.29.4.1.domain: 8916+ A? gitlab.com. (28)
22:09:50.543322 ens18 Out IP 10.1.0.5.56870 > 10.29.4.1.domain: 53962+ AAAA? gitlab.com. (28)
22:09:50.578448 ens18 Out IP 10.1.0.5.41928 > 10.29.4.1.domain: 22411+ PTR? 1.4.29.10.in-addr.arpa. (40)
22:09:50.666756 ens18 Out IP 10.1.0.5.43081 > 10.29.4.1.domain: 57274+ PTR? 5.0.1.10.in-addr.arpa. (39)
22:10:10.415632 ens18 Out IP 10.1.0.5.48355 > 10.29.4.1.domain: 41962+ A? gitlab.com. (28)
22:10:10.510841 ens18 Out IP 10.1.0.5.37312 > 10.29.4.1.domain: 32236+ AAAA? gitlab.com. (28)
Сами ядра ЦПУ в диспетчере устройств отображаются с восклицаниями (code 32). Это лечится выбором драйвера "процессор" вместо "процессор intel", но не помогает.