What is wrong with this configuration?

Started by netappsseinvater, May 20, 2021, 08:36:35 PM

Previous topic - Next topic
Hey guys,

my friend and me are working on a project, we have to build our own network in a virtual environment (proxmox) You can find the netplan in the attachment. The 3 Firewalls(Gateways) (Gateway, Firewall DMZ and Firewall Internal) are running OPNsense and all the other components are running either ubuntu workstation or server as you can see in the document. We have tried to set up the interfaces according to the plan but for some reason it doesnt seem to work. According to my knowledge just by setting up the interfaces properly (with ip addresses and stuff) Firewall DMZ and Firewall Internal should be able to ping each other and Gateway and Firewall DMZ should be able to ping each other but thats not working in our case. Also whats the role of upstream gateway since we saw that while configuring as well?

Thanks in advance

For pings you need to allow icmp type echo request inbound.

Have not read the rest but that might be a first thing to look at.

I dont think thats the problem. Funny thing is i can ping the Gateway from Firewall DMZ but not the other way around which just doesn't make sense. If i can ping one from the other, then it should be the same the other way around especially if they are directly connected like in this case...

No, this is a firewall. It only allows WHITELISTED communication. You can only ping Firewall DMZ from Gateway, if the interface (probably WAN) allows ICMP echo request.

Hi netappsseinvater,

Please find attached my network diagram.

Here the outcome of the ping commands executed in different segments of my net work:

Aus dem WLAN  ###############################################
Aus dem WLAN  C:\Users\ZZunder>hostname
Aus dem WLAN  NB03
Aus dem WLAN 
Aus dem WLAN  C:\Users\ZZunder>echo LAN
Aus dem WLAN  LAN
Aus dem WLAN  C:\Users\ZZunder>ping -n 4 pc09.localdomain
Aus dem WLAN  Ping wird ausgeführt für pc09.localdomain [192.168.148.109] mit 32 Bytes Daten:
Aus dem WLAN  Zeitüberschreitung der Anforderung.
Aus dem WLAN  Zeitüberschreitung der Anforderung.
Aus dem WLAN  Zeitüberschreitung der Anforderung.
Aus dem WLAN  Zeitüberschreitung der Anforderung.
Aus dem WLAN 
Aus dem WLAN  C:\Users\ZZunder>echo DMZ
Aus dem WLAN  DMZ
Aus dem WLAN  C:\Users\ZZunder>ping -n 4 pc06.localdomain
Aus dem WLAN  Ping wird ausgeführt für pc06.localdomain [192.168.147.106] mit 32 Bytes Daten:
Aus dem WLAN  Antwort von 192.168.147.106: Bytes=32 Zeit=2ms TTL=63
Aus dem WLAN  Antwort von 192.168.147.106: Bytes=32 Zeit=4ms TTL=63
Aus dem WLAN  Antwort von 192.168.147.106: Bytes=32 Zeit=4ms TTL=63
Aus dem WLAN  Antwort von 192.168.147.106: Bytes=32 Zeit=4ms TTL=63
Aus dem WLAN 
Aus dem WLAN  C:\Users\ZZunder>echo WLAN
Aus dem WLAN  WLAN
Aus dem WLAN  C:\Users\ZZunder>ping -n 4 fritz.localdomain
Aus dem WLAN  Ping wird ausgeführt für fritz.localdomain [192.168.146.50] mit 32 Bytes Daten:
Aus dem WLAN  Antwort von 192.168.146.50: Bytes=32 Zeit=3ms TTL=64
Aus dem WLAN  Antwort von 192.168.146.50: Bytes=32 Zeit=1ms TTL=64
Aus dem WLAN  Antwort von 192.168.146.50: Bytes=32 Zeit=8ms TTL=64
Aus dem WLAN  Antwort von 192.168.146.50: Bytes=32 Zeit=3ms TTL=64
Aus dem WLAN 
Aus dem WLAN  C:\Users\ZZunder>echo Public IP
Aus dem WLAN  Public IP
Aus dem WLAN  C:\Users\ZZunder>ping -n 4 ts.thogru.de
Aus dem WLAN  Ping wird ausgeführt für ts.thogru.de [95.112.0.249] mit 32 Bytes Daten:
Aus dem WLAN  Zeitüberschreitung der Anforderung.
Aus dem WLAN  Zeitüberschreitung der Anforderung.
Aus dem WLAN  Zeitüberschreitung der Anforderung.
Aus dem WLAN  Zeitüberschreitung der Anforderung.
Aus dem WLAN 


Aus dem LAN  ###############################################
Aus dem LAN  C:\Users\ZZunder>hostname
Aus dem LAN  PC09
Aus dem LAN 
Aus dem LAN  C:\Users\ZZunder>echo LAN
Aus dem LAN  LAN
Aus dem LAN  C:\Users\ZZunder>ping -n 4 pc09.localdomain
Aus dem LAN  Ping wird ausgeführt für pc09.localdomain [192.168.148.109] mit 32 Bytes Daten:
Aus dem LAN  Antwort von 192.168.148.109: Bytes=32 Zeit<1ms TTL=128
Aus dem LAN  Antwort von 192.168.148.109: Bytes=32 Zeit<1ms TTL=128
Aus dem LAN  Antwort von 192.168.148.109: Bytes=32 Zeit<1ms TTL=128
Aus dem LAN  Antwort von 192.168.148.109: Bytes=32 Zeit<1ms TTL=128
Aus dem LAN 
Aus dem LAN  C:\Users\ZZunder>echo DMZ
Aus dem LAN  DMZ
Aus dem LAN  C:\Users\ZZunder>ping -n 4 pc06.localdomain
Aus dem LAN  Ping wird ausgeführt für pc06.localdomain [192.168.147.106] mit 32 Bytes Daten:
Aus dem LAN  Antwort von 192.168.147.106: Bytes=32 Zeit<1ms TTL=63
Aus dem LAN  Antwort von 192.168.147.106: Bytes=32 Zeit<1ms TTL=63
Aus dem LAN  Antwort von 192.168.147.106: Bytes=32 Zeit<1ms TTL=63
Aus dem LAN  Antwort von 192.168.147.106: Bytes=32 Zeit<1ms TTL=63
Aus dem LAN 
Aus dem LAN  C:\Users\ZZunder>echo WLAN
Aus dem LAN  WLAN
Aus dem LAN  C:\Users\ZZunder>ping -n 4 fritz.localdomain
Aus dem LAN  Ping wird ausgeführt für fritz.localdomain [192.168.146.50] mit 32 Bytes Daten:
Aus dem LAN  Antwort von 192.168.146.50: Bytes=32 Zeit=1ms TTL=63
Aus dem LAN  Antwort von 192.168.146.50: Bytes=32 Zeit<1ms TTL=63
Aus dem LAN  Antwort von 192.168.146.50: Bytes=32 Zeit<1ms TTL=63
Aus dem LAN  Antwort von 192.168.146.50: Bytes=32 Zeit<1ms TTL=63
Aus dem LAN 
Aus dem LAN  C:\Users\ZZunder>echo Public IP
Aus dem LAN  Public IP
Aus dem LAN  C:\Users\ZZunder>ping -n 4 ts.thogru.de
Aus dem LAN  Ping wird ausgeführt für ts.thogru.de [95.112.0.249] mit 32 Bytes Daten:
Aus dem LAN  Antwort von 95.112.0.249: Bytes=32 Zeit<1ms TTL=64
Aus dem LAN  Antwort von 95.112.0.249: Bytes=32 Zeit<1ms TTL=64
Aus dem LAN  Antwort von 95.112.0.249: Bytes=32 Zeit<1ms TTL=64
Aus dem LAN  Antwort von 95.112.0.249: Bytes=32 Zeit<1ms TTL=64
Aus dem LAN 


Aus DMZ  ###############################################
Aus DMZ  pc06user@pc06:~$ hostname
Aus DMZ  pc06
Aus DMZ 
Aus DMZ  pc06user@pc06:~$ echo LAN
Aus DMZ  LAN
Aus DMZ  pc06user@pc06:~$ ping -c 4 pc09.localdomain
Aus DMZ  PING pc09.localdomain (192.168.148.109) 56(84) bytes of data.
Aus DMZ  --- pc09.localdomain ping statistics ---
Aus DMZ  4 packets transmitted, 0 received, 100% packet loss, time 3068ms
Aus DMZ 
Aus DMZ  pc06user@pc06:~$ echo DMZ
Aus DMZ  DMZ
Aus DMZ  pc06user@pc06:~$ ping -c 4 pc06.localdomain
Aus DMZ  PING pc06.localdomain (192.168.147.106) 56(84) bytes of data.
Aus DMZ  64 bytes from PC06.localdomain (192.168.147.106): icmp_seq=1 ttl=64 time=0.023 ms
Aus DMZ  64 bytes from PC06.localdomain (192.168.147.106): icmp_seq=2 ttl=64 time=0.035 ms
Aus DMZ  64 bytes from PC06.localdomain (192.168.147.106): icmp_seq=3 ttl=64 time=0.041 ms
Aus DMZ  64 bytes from PC06.localdomain (192.168.147.106): icmp_seq=4 ttl=64 time=0.044 ms
Aus DMZ  --- pc06.localdomain ping statistics ---
Aus DMZ  4 packets transmitted, 4 received, 0% packet loss, time 3054ms
Aus DMZ  rtt min/avg/max/mdev = 0.023/0.035/0.044/0.008 ms
Aus DMZ 
Aus DMZ  pc06user@pc06:~$ echo WLAN
Aus DMZ  WLAN
Aus DMZ  pc06user@pc06:~$ ping -c 4 fritz.localdomain
Aus DMZ  PING fritz.localdomain (192.168.146.50) 56(84) bytes of data.
Aus DMZ  64 bytes from fritz.localdomain (192.168.146.50): icmp_seq=1 ttl=63 time=0.718 ms
Aus DMZ  64 bytes from fritz.localdomain (192.168.146.50): icmp_seq=2 ttl=63 time=0.908 ms
Aus DMZ  64 bytes from fritz.localdomain (192.168.146.50): icmp_seq=3 ttl=63 time=0.952 ms
Aus DMZ  64 bytes from fritz.localdomain (192.168.146.50): icmp_seq=4 ttl=63 time=0.885 ms
Aus DMZ  --- fritz.localdomain ping statistics ---
Aus DMZ  4 packets transmitted, 4 received, 0% packet loss, time 3003ms
Aus DMZ  rtt min/avg/max/mdev = 0.718/0.865/0.952/0.088 ms
Aus DMZ 
Aus DMZ  pc06user@pc06:~$ echo Public IP
Aus DMZ  Public IP
Aus DMZ  pc06user@pc06:~$ ping -c 4 ts.thogru.de
Aus DMZ  PING ts.thogru.de (95.112.0.249) 56(84) bytes of data.
Aus DMZ  --- ts.thogru.de ping statistics ---
Aus DMZ  4 packets transmitted, 0 received, 100% packet loss, time 3073ms

Von OPNsense  ###############################################
Von OPNsense  $ hostname
Von OPNsense  OPNsense.localdomain
Von OPNsense 
Von OPNsense  $ echo LAN
Von OPNsense  LAN
Von OPNsense  $ ping -c 4 pc09.localdomain
Von OPNsense  PING pc09.localdomain (192.168.148.109): 56 data bytes
Von OPNsense  64 bytes from 192.168.148.109: icmp_seq=0 ttl=128 time=0.493 ms
Von OPNsense  64 bytes from 192.168.148.109: icmp_seq=1 ttl=128 time=0.655 ms
Von OPNsense  64 bytes from 192.168.148.109: icmp_seq=2 ttl=128 time=0.548 ms
Von OPNsense  64 bytes from 192.168.148.109: icmp_seq=3 ttl=128 time=0.635 ms
Von OPNsense  --- pc09.localdomain ping statistics ---
Von OPNsense  4 packets transmitted, 4 packets received, 0.0% packet loss
Von OPNsense  round-trip min/avg/max/stddev = 0.493/0.583/0.655/0.066 ms
Von OPNsense 
Von OPNsense  $ echo DMZ
Von OPNsense  DMZ
Von OPNsense  $ ping -c 4 pc06.localdomain
Von OPNsense  PING pc06.localdomain (192.168.147.106): 56 data bytes
Von OPNsense  64 bytes from 192.168.147.106: icmp_seq=0 ttl=64 time=0.419 ms
Von OPNsense  64 bytes from 192.168.147.106: icmp_seq=1 ttl=64 time=0.454 ms
Von OPNsense  64 bytes from 192.168.147.106: icmp_seq=2 ttl=64 time=0.509 ms
Von OPNsense  64 bytes from 192.168.147.106: icmp_seq=3 ttl=64 time=0.507 ms
Von OPNsense  --- pc06.localdomain ping statistics ---
Von OPNsense  4 packets transmitted, 4 packets received, 0.0% packet loss
Von OPNsense  round-trip min/avg/max/stddev = 0.419/0.472/0.509/0.038 ms
Von OPNsense 
Von OPNsense  $ echo WLAN
Von OPNsense  WLAN
Von OPNsense  $ ping -c 4 fritz.localdomain
Von OPNsense  PING fritz.localdomain (192.168.146.50): 56 data bytes
Von OPNsense  64 bytes from 192.168.146.50: icmp_seq=0 ttl=64 time=0.649 ms
Von OPNsense  64 bytes from 192.168.146.50: icmp_seq=1 ttl=64 time=0.612 ms
Von OPNsense  64 bytes from 192.168.146.50: icmp_seq=2 ttl=64 time=0.620 ms
Von OPNsense  64 bytes from 192.168.146.50: icmp_seq=3 ttl=64 time=0.619 ms
Von OPNsense  --- fritz.localdomain ping statistics ---
Von OPNsense  4 packets transmitted, 4 packets received, 0.0% packet loss
Von OPNsense  round-trip min/avg/max/stddev = 0.612/0.625/0.649/0.014 ms
Von OPNsense 
Von OPNsense  $ echo Public IP
Von OPNsense  Public IP
Von OPNsense  $ ping -c 4 ts.thogru.de
Von OPNsense  PING ts.thogru.de (95.112.0.249): 56 data bytes
Von OPNsense  64 bytes from 95.112.0.249: icmp_seq=0 ttl=64 time=0.411 ms
Von OPNsense  64 bytes from 95.112.0.249: icmp_seq=1 ttl=64 time=0.281 ms
Von OPNsense  64 bytes from 95.112.0.249: icmp_seq=2 ttl=64 time=0.257 ms
Von OPNsense  64 bytes from 95.112.0.249: icmp_seq=3 ttl=64 time=0.289 ms
Von OPNsense  --- ts.thogru.de ping statistics ---
Von OPNsense  4 packets transmitted, 4 packets received, 0.0% packet loss
Von OPNsense  round-trip min/avg/max/stddev = 0.257/0.309/0.411/0.060 ms
Von OPNsense 
Von OPNsense 


As you can see, I only get responses for my public IP when ping is executed in the LAN or directly from the router.

I assume that also no answer comes, as soon as the Public IP is pinged from the Internet. You can try this out.

In summary: The result of the ping command depends on the configuration of the router.

As you have multiple OPNsense routers in your network you must configure some/all of the to accept ICMP packets at the upstream interfaces (in my network the WAN). Aditionally you must set up rules, so ICMP packets can pass (are routed) through your OPNsense routers.

Kind Regards,
Thomas
Don't forget to [applaud] those offering time and brainpower to help you!