VM cannot access apps on host

Karbust

Cadet
Joined
Jun 1, 2023
Messages
4
Hello,

I'm trying to setup a VM with Ubuntu but, I'm having issues access the apps running on the host from within the VM. I can access the host itself from the VM.

I have setup a bridge interface and can access the internet, the host and the LAN.

This are my interfaces:
raw

  • br0 doesn't have any members.
  • bond1 is from eno1 and eno2.

The VM has 2 NICs, one for bond1 (to access the internet and LAN), and another for br0, to access the host:
raw

raw



My netplan settings:
Code:
network:
  ethernets:
    ens3:
      addresses:
      - 192.168.1.173/24
      nameservers:
        addresses: [192.168.1.163]
      routes:
        - to: default
          via: 192.168.1.254
    ens4:
      addresses:
      - 192.168.20.5/24
  version: 2


Code:
$ ping 192.168.20.10
PING 192.168.20.10 (192.168.20.10) 56(84) bytes of data.
64 bytes from 192.168.20.10: icmp_seq=1 ttl=64 time=0.560 ms
64 bytes from 192.168.20.10: icmp_seq=2 ttl=64 time=0.575 ms
64 bytes from 192.168.20.10: icmp_seq=3 ttl=64 time=0.502 ms
64 bytes from 192.168.20.10: icmp_seq=4 ttl=64 time=0.570 ms
^C
--- 192.168.20.10 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3070ms
rtt min/avg/max/mdev = 0.502/0.551/0.575/0.029 ms

$ curl http://192.168.20.10:9117
curl: (7) Failed to connect to 192.168.20.10 port 9117 after 3 ms: Connection refused


Any idea of what may be missing?

Thank you
 

chuck32

Guru
Joined
Jan 14, 2023
Messages
623
I saw the thread earlier but didn't spot s definitive problem.

Since you bumped I try and share my guesswork, I don't use apps.

So far it looks good, you created a bridge which should allow access.

1) I seriously don't know, can't you add a bond to s bridge? Attaching two NICs because the bridge is empty seems overly complicated unless you have a reason for that. I

2) Does your command work from other machines on the network? Connection is refused, not unavailable. What app are you trying to reach?

3) What interface is added to your app? If you didn't add the bridge I think this may be the reason. For example I think, if you add the bond to the app and haven't added the bond to the bridge as a member it will not work.

4) Maybe the app is restricted to host IPs, and the bridge is not in the same subnet.
 

Karbust

Cadet
Joined
Jun 1, 2023
Messages
4
I saw the thread earlier but didn't spot s definitive problem.

Since you bumped I try and share my guesswork, I don't use apps.

So far it looks good, you created a bridge which should allow access.

1) I seriously don't know, can't you add a bond to s bridge? Attaching two NICs because the bridge is empty seems overly complicated unless you have a reason for that. I

2) Does your command work from other machines on the network? Connection is refused, not unavailable. What app are you trying to reach?

3) What interface is added to your app? If you didn't add the bridge I think this may be the reason. For example I think, if you add the bond to the app and haven't added the bond to the bridge as a member it will not work.

4) Maybe the app is restricted to host IPs, and the bridge is not in the same subnet.
Thank you for your reply.

1) I already tried to add the bond to the bridge, it works but gives the same result.
2) Yes, the command works on other machines in the network. The application is Jackett, but I tried with sonarr, radarr, qbittorrent, and the result is the same.
3) The apps I mentioned above don't have any interface added, just configured the basic fields (using the chart from TrueCharts)
4) That is strange, since I can access it from the same network where I added the VM (192.168.1.0/24, my home network).

I have also tried to remove the IP Address alias (192.168.1.181/24) from the bond interface and add it to the bridge (had to remove the interface from some apps that specifically use that interface to get a "physical" IP)

I will try to add the apps specifically to the bridge interface to see if it gives me a different result.
 
Top