Archivio: 11 Novembre 2023

Disco iSCSI visibile tra i dispositivi ma non tra i datastore

Problema tra sistemi. Ho uno storage con TrueNAS che esporta verso un cluster due dischi iSCSI e una cartella NFS, utilizzati come datastore per le VM.

A causa di un problema con il disco di avvio dello storage ho dovuto reinstallare da zero TrueNAS, versione SCALE 23.10.0.1.

Nessun problema con la reimportazione dei volumi su TrueNAS, pochi aggiustamenti sui permessi e tutto pare tornato a posto.

I dischi iSCSI esportati verso il cluster, però, non sono visibili. Sono visibili i dispositivi fisici ma i datastore non vengono montati da nessun nodo.

In questo caso i dispositivi vengono erroneamente interpretati come snapshot. Possiamo montarli come datastore con il comando “esxcfg-volume -M xxxx
Verifichiamo con “esxcli storage vmfs snapshot list“:

[root@alfa:~] esxcli storage vmfs snapshot list
63d4ea88-32fcf386-7e0e-yyyyyyyyyyyy
   Volume Name: iRaid
   VMFS UUID: 63d4ea88-32fcf386-7e0e-yyyyyyyyyyyy
   Can mount: true
   Reason for un-mountability: 
   Can resignature: true
   Reason for non-resignaturability: 
   Unresolved Extent Count: 1

63d7dc50-2758fd2c-fca2-xxxxxxxxxxxx
   Volume Name: iSSD
   VMFS UUID: 63d7dc50-2758fd2c-fca2-xxxxxxxxxxxx
   Can mount: true
   Reason for un-mountability: 
   Can resignature: true
   Reason for non-resignaturability: 
   Unresolved Extent Count: 1

In effetti i due dischi vengono visti come snapshot. Forziamo il mount dei datastore:

root@alfa:~] esxcfg-volume -M "63d4ea88-32fcf386-7e0e-yyyyyyyyyyyy"
Persistently mounting volume 63d4ea88-32fcf386-7e0e-yyyyyyyyyyyy

e

[root@alfa:~] esxcfg-volume -M "63d7dc50-2758fd2c-fca2-xxxxxxxxxxxx"
Persistently mounting volume 63d7dc50-2758fd2c-fca2-xxxxxxxxxxxx

Adesso è ok

Port forwarding su Fortinet firewall

Piccola ricetta per effettuare un port forward su router Fortinet

Per inoltrare il traffico TCP o UDP ricevuto dall’interfaccia esterna di un FortiGate verso un server interno dobbiamo seguire questi due passi:

  • Aggiungere un Virtual IP
  • Aggiungere una regola sul firewall

In questo esempio configuriamo l’inoltro di una porta

This example describes how to configure port forwarding to allow access to an internal Windows Server PC with the Remote access protocol which uses the default port of 3389.

To add a virtual IP that forwards RDP packets

1) For FortiOS 6.0.x,6.2.x,7.0.x,7.2.x, Navigate to Policy & Objects > Virtual IPs.
1.1) Select Create New.
1.2) Add a name for the virtual IP.
1.3) Select the External Interface. This will typically be the interface that connects the FortiGate to the Internet.
1.4) Set the External IP Address/Range. The following can be used:

  • The FortiGate unit public IP.
  • If there is a cable or DSL connection with a dynamic IP, it is possible to use 0.0.0.0.
  • If the ISP provides a block of IPs that route to the FortiGate external interface, it is possible to add one of these IPs here.
    4) Set the Mapped IP Address to the internal IP address of the Windows Server PC.
    5) Select Port Forwarding.
    6) Set protocol to TCP.
    7) Set External Service Port and Map to Port. For this example, the RDP service uses port 3389. Set both External service port and Map to Port to 3389.
    8) Select OK.

Now all that’s left is to define a firewall policy that accepts RDP traffic from the Internet and forwards it to the internal Windows Server PC.

To add a firewall policy with a virtual IP.

1)In 6.0, Go to Policy & Objects -> IPv4 Policy.
In 6.4.x,7.0.x,7.2.x, Navigate to Policy & Objects => Firewall Policy.
2) Select Create New.
3) Set Source Interface to the WAN/Internet interface.
4) Set Source Addresses to all.
5) Set Destination Interface to internal.
6) Set the Destination Address to the name of the virtual IP.
7) Usually, the remainder of the options in this firewall policy does not need to be changed. For example, the Service can remain ANY, because the virtual IP only forwards packets using port 3389.
8) Select OK.