Második IP cím felvétele gubanc
Sziasztok!
Picit hosszú leszek, de minden szükséges infót szeretnék megadni ahhoz, hogy tudjatok segíteni.
Adott egy bérelt szerver a Hetznernél. Az ethernet kártyára az lspci az alábbit köpi:
23:00.0 Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev 03)
Nos A gép webszerverként működik. Ubuntu 24.04-et raktam rá.
Gépet megvettem, felraktam rá, amit akartam, nem nagy truváj. Majd jött az ötlet, hogy miért ne válthatnám ki egy géppel 2 gép funkcióját úgy, hogy 2 IP címet használok. Fel is húztam egy postfixet dockerben, ami látszólag működik is. Azonban hiába állítottam be az új IP-t, arra az Istennek se akar hallgatni. Sem a pingre, se másra nem válaszol.
A 95.217.36.183 IP-vel vettem a gépet, a 95.217.36.178-at pedig utólag kértem hozzá (ezzel van bajom).
cat /etc/netplan/01-netcfg.yaml
### Hetzner Online GmbH installimage
network:
version: 2
renderer: networkd
ethernets:
enp35s0:
addresses:
- 95.217.36.183/32
- 95.217.36.178/32
- 2a01:4f9:2b:2ee9::2/64
routes:
- on-link: true
to: 0.0.0.0/0
via: 95.217.36.129
- to: default
via: fe80::1
nameservers:
addresses:
- 8.8.8.8
- 2a01:4ff:ff00::add:1
- 8.8.4.4
- 2a01:4ff:ff00::add:2
Nézzünk egy ilyet is:
ip route show
default via 95.217.36.129 dev enp35s0 proto static onlink
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1
Oké, akkor mit mond az ifconfig:
docker0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255 inet6 fe80::42:71ff:fe0b:7ae6 prefixlen 64 scopeid 0x20<link> ether 02:42:71:0b:7a:e6 txqueuelen 0 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 4 bytes 440 (440.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 enp35s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 95.217.36.183 netmask 255.255.255.255 broadcast 0.0.0.0 inet6 2a01:4f9:2b:2ee9::2 prefixlen 64 scopeid 0x0<global> inet6 fe80::aaa1:59ff:fe3e:bb9d prefixlen 64 scopeid 0x20<link> ether a8:a1:59:3e:bb:9d txqueuelen 1000 (Ethernet) RX packets 219528 bytes 39465168 (39.4 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 294920 bytes 245145398 (245.1 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device memory 0xfc200000-fc27ffff lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Local Loopback) RX packets 559491 bytes 158599643 (158.5 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 559491 bytes 158599643 (158.5 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 vethdcbc1b1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet6 fe80::5c59:98ff:fe0e:5cf4 prefixlen 64 scopeid 0x20<link> ether 5e:59:98:0e:5c:f4 txqueuelen 0 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 8 bytes 800 (800.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
és az ip addr show:
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 inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: enp35s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 link/ether a8:a1:59:3e:bb:9d brd ff:ff:ff:ff:ff:ff inet 95.217.36.183/32 scope global enp35s0 valid_lft forever preferred_lft forever inet 95.217.36.178/32 scope global enp35s0 valid_lft forever preferred_lft forever inet6 2a01:4f9:2b:2ee9::2/64 scope global valid_lft forever preferred_lft forever inet6 fe80::aaa1:59ff:fe3e:bb9d/64 scope link valid_lft forever preferred_lft forever 3: docker0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default link/ether 02:42:71:0b:7a:e6 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 inet6 fe80::42:71ff:fe0b:7ae6/64 scope link valid_lft forever preferred_lft forever 5: vethdcbc1b1@if4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master docker0 state UP group default link/ether 5e:59:98:0e:5c:f4 brd ff:ff:ff:ff:ff:ff link-netnsid 0 inet6 fe80::5c59:98ff:fe0e:5cf4/64 scope link valid_lft forever preferred_lft forever
Na meg az ufw (iptables -L -n -v kimenet ide kattintva olvasható)
ufw status verbose Status: active Logging: on (low) Default: deny (incoming), allow (outgoing), allow (routed) New profiles: skip To Action From -- ------ ---- 80/tcp ALLOW IN Anywhere 443/tcp ALLOW IN Anywhere 2226 ALLOW IN Anywhere 2226/tcp ALLOW IN Anywhere 110/tcp ALLOW IN Anywhere 995/tcp ALLOW IN Anywhere 143/tcp ALLOW IN Anywhere 993/tcp ALLOW IN Anywhere 25/tcp ALLOW IN Anywhere 465/tcp ALLOW IN Anywhere 587/tcp ALLOW IN Anywhere 18105/tcp ALLOW IN Anywhere 6379/tcp ALLOW IN Anywhere 95.217.36.178 on enp35s0 ALLOW IN Anywhere 2525 ALLOW IN Anywhere 80/tcp (v6) ALLOW IN Anywhere (v6) 443/tcp (v6) ALLOW IN Anywhere (v6) 2226 (v6) ALLOW IN Anywhere (v6) 2226/tcp (v6) ALLOW IN Anywhere (v6) 110/tcp (v6) ALLOW IN Anywhere (v6) 995/tcp (v6) ALLOW IN Anywhere (v6) 143/tcp (v6) ALLOW IN Anywhere (v6) 993/tcp (v6) ALLOW IN Anywhere (v6) 25/tcp (v6) ALLOW IN Anywhere (v6) 465/tcp (v6) ALLOW IN Anywhere (v6) 587/tcp (v6) ALLOW IN Anywhere (v6) 18105/tcp (v6) ALLOW IN Anywhere (v6) 6379/tcp (v6) ALLOW IN Anywhere (v6) 2525 (v6) ALLOW IN Anywhere (v6) Anywhere ALLOW OUT 95.217.36.178 on enp35s0
És végül ping:
ping 95.217.36.178 PING 95.217.36.178 (95.217.36.178): 56 data bytes Request timeout for icmp_seq 0 Request timeout for icmp_seq 1
Bárkinek bármi használható ötlete van esetleg? Ha még infó kell, szóljatok és írom. Köszönöm.
- Tovább (Második IP cím felvétele gubanc)