-1

I have 2 websites working fine on the same IP (92.46.87.48). Is a ubuntu server on a VM. Now I need to assign one ip for every website. I edit the /etc/hosts fine, I just buy an additional IP and now I need to config the network. All servers are working fine, I just can't reach the new IP (92.46.87.15). With my actual config, If i ping, I recieve the "pong" only from the same machine (92.46.87.48). No ping from outside.

"PROXMOX DEBIAN SERVER" IP = 92.46.87.52 (only 1 VM with 2 IPs)

"VM UBUNTU 22 SERVER" IP = 92.46.87.48 (subnet 92.46.87.48/27)

Gateway:    92.46.87.33 
Netmask:    255.255.255.224

"VM UBUNTU 22 SERVER" ADDITIONAL IP = 92.46.87.15 (subnet 92.46.87.15/27)

Gateway:    92.46.87.1
Netmask:    255.255.255.224

"PROXMOX SERVER" /etc/network/interface

source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback

auto eno1
iface eno1 inet manual

auto vmbr0
iface vmbr0 inet static
        address 92.46.87.52/27
        gateway 92.46.87.33
        bridge-ports eno1
        bridge-stp off
        bridge-fd 0
        up ip route add 92.46.87.15 dev vmbr0
        
        #Kvm bridged mode TCP/IP network performance fix (hardware hangup)
        pre-up /sbin/ethtool --offload eno1 gso off tso off sg off gro off

"PROXMOX SERVER" route -n (NO PING TO THE NEW ADDITIONAL IP)

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         92.46.87.33     0.0.0.0         UG    0      0        0 vmbr0
92.46.87.32     0.0.0.0         255.255.255.224 U     0      0        0 vmbr0

"PROXMOX SERVER": ip route add 92.46.87.15 dev vmbr0

"PROXMOX SERVER (ping ok now)" ping 92.46.87.15

64 bytes from 92.46.87.15: icmp_seq=1 ttl=64 time=0.259 ms

"PROXMOX SERVER" route -n

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         92.46.87.33     0.0.0.0         UG    0      0        0 vmbr0
92.46.87.15     0.0.0.0         255.255.255.255 UH    0      0        0 vmbr0
92.46.87.32     0.0.0.0         255.255.255.224 U     0      0        0 vmbr0

"PROXMOX SERVER" ip addr show vmbr0

3: vmbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether a0:36:bc:29:89:e1 brd ff:ff:ff:ff:ff:ff
    inet 92.46.87.52/27 scope global vmbr0
       valid_lft forever preferred_lft forever

"UBUNTU SERVER" /etc/network/interface

source /etc/network/interfaces.d/*
    
auto lo
iface lo inet lookback

auto ens18
iface ens18 inet static
        address 00:50:56:00:35:D3
        gateway 92.46.87.33

"UBUNTU SERVER" /etc/netplan/00-installer-config.yaml

network:
  renderer: networkd
  ethernets:
    ens18:
      dhcp4: false
      dhcp6: false
      optional: true
      addresses:
        - 92.46.87.48/27
        - 92.46.87.15/27
      nameservers:
        addresses: [1.1.1.1,8.8.8.8]
      routes:
        - to: default
          via: 92.46.87.33
          metric: 100
          on-link: true
  version: 2

"UBUNTU SERVER" ip a

2: ens18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:50:56:00:35:d3 brd ff:ff:ff:ff:ff:ff
    altname enp0s18
    inet 92.46.87.48/27 brd 92.46.87.63 scope global ens18
       valid_lft forever preferred_lft forever
    inet 92.46.87.15/27 brd 92.46.87.31 scope global ens18
       valid_lft forever preferred_lft forever

"UBUNTU SERVER" route -n

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         92.46.87.33     0.0.0.0         UG    100    0        0 ens18
92.46.87.0      0.0.0.0         255.255.255.224 U     0      0        0 ens18
92.46.87.32     0.0.0.0         255.255.255.224 U     0      0        0 ens18

"UBUNTU SERVER" ping 92.46.87.15

64 bytes from 92.46.87.15: icmp_seq=1 ttl=64 time=0.007 ms

So, what do you think guys? What is the reason that I can't reach 92.46.87.15 from outside? Thank you!

13
  • 1
    The additional IP address is in different subnet than the original IP address. 92.46.87.15 is in 92.46.87.0/27 subnet and 92.46.87.48 is in 92.46.87.32/27 subnet. Having two different subnet IP addresses on same interface doesn't sound right. However, without knowledge of the provider's network setup this is difficult to diagnose. Please double-check your provider documentation and ask help from their support. Nov 10, 2023 at 8:04
  • 1
    Indeed, such kind of question should always come along with the host provider's name and a link to its documentation on how to use multiple addresses (each provider has its own quirk).
    – A.B
    Nov 10, 2023 at 9:38
  • Now I need to assign one ip for every website - Why? Named based vhosts has been a thing for quite a while.
    – vidarlo
    Nov 10, 2023 at 9:43
  • Tell us if the packet is making it to 92.46.87.1.
    – Greg Askew
    Nov 10, 2023 at 12:33
  • @GregAskew there is no response pinging that gateway.
    – SixSense
    Nov 10, 2023 at 14:08

2 Answers 2

0

When ping fails and you don’t know why, you should try traceroute next. From the Windows command prompt type “tracert” followed by a space and your desired IP address and the Enter key. You should see a list of “hops” that the packet takes on its way to your specified direction.

Errors you may get include “timeout” (no response) which indicates a bad connection somewhere, and “no route” which means things are not configured properly.

Also check your firewall restrictions.

1
  • Yes, "things are not configured properly", thats why I'm here.
    – SixSense
    Nov 10, 2023 at 7:31
0

I found the problem. On Hetzer if you config the "Bridged Network" you have:

IP addresses from additional subnets can only be used on the host system or on a single VM with a single IP

The solution must be the "Routed Network"

Multiple single IP addresses and subnets can be used on one VM.

So I tried to configure multiple IPs on bridge network..

You must log in to answer this question.

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