Score:1

Setup Ubuntu 22.04 go to the internet using loopback IP by default

sh flag

I directly connect my Ubuntu 22.04 server to the router with 2 FC cables (bonding). The server and router will connect together with the subnet 10.27.28.5/30. I install my app in the container. I map this container with 1 IP public which set in the loopback interface.

Now I can ping to the IP public in loopback interface from the internet, but I cannot ping from the server to 8.8.8.8. I still can traceroute to 8.8.8.8 with the source is the public IP although I cann't traceroute without source.

ping 8.8.8.8

PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.

^C

--- 8.8.8.8 ping statistics ---

5 packets transmitted, 0 received, 100% packet loss, time 4087ms

traceroute 8.8.8.8

traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 60 byte packets

1 _gateway (10.27.28.5) 1.602 ms 1.592 ms 1.609 ms

2 * * *

3 * * *

traceroute 8.8.8.8 -s

traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 60 byte packets

1 _gateway (10.27.28.5) 1.600 ms 1.790 ms 1.943 ms

2 10.52.226.145 (10.52.226.145) 1.425 ms 10.52.226.149 (10.52.226.149) 1.570 ms 1.566 ms

...

13 * * *

14 8.8.8.8 (8.8.8.8) 45.061 ms 45.418 ms 45.377 ms

I configure IP and routes by netplan

'# Let NetworkManager manage all devices on this system

network:

version: 2

renderer: NetworkManager

ethernets:

  eno8403:

      dhcp4: false

      dhcp6: false

      dhcp4-overrides:

          use-routes: false

  eno8303:

      addresses: [10.52.17.251/29]

      routes:

          - to: 10.24.4.0/24

            via: 10.52.17.249

          - to: 10.24.5.0/24

            via: 10.52.17.249

          - to: 10.27.10.0/24

            via: 10.52.17.249

          - to: 10.27.11.0/24

            via: 10.52.17.249

      dhcp6: false

      dhcp4: false

      dhcp4-overrides:

          use-routes: false

  enp1s0f0np0:

      dhcp4: false

  enp1s0f1np1:

      dhcp4: false

  loop1:

      renderer: networkd

      dhcp4: false

      dhcp6: false

      addresses:

          - *.*.*.*/32

      dhcp4-overrides:

          use-routes: false

bonds:

  bond0:

      interfaces: [enp1s0f0np0,enp1s0f1np1]

      mtu: 9000

      parameters:

          mode: balance-rr

          mii-monitor-interval: 100

      addresses:

          - 10.27.28.6/30

      routes:

          - to: default

            via: 10.27.28.5

IP route table

default via 10.27.28.5 dev bond0 proto static metric 20300

10.24.4.0/24 via 10.52.17.249 dev eno8303 proto static metric 100

10.24.5.0/24 via 10.52.17.249 dev eno8303 proto static metric 100

10.27.10.0/24 via 10.52.17.249 dev eno8303 proto static metric 100

10.27.11.0/24 via 10.52.17.249 dev eno8303 proto static metric 100

10.27.28.4/30 dev bond0 proto kernel scope link src 10.27.28.6 metric 300

10.52.17.248/29 dev eno8303 proto kernel scope link src 10.52.17.251 metric 100

169.254.0.0/16 dev docker0 scope link metric 1000

172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1

So how can I set default go to the internet with IP public. I check app can go to the internet but the server itself cannot, so I can update packet for it.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.