Bonjour à tous,

Je fait appel à vous car je suis face à un comportement étrange du couple FreeBSD + XCP-NG

Je vous explique la situation, j'ai deux machines dans XCP-NG

1 - FreeBSD ( Le "routeur" ) qui possède deux cartes

  • Carte1 - Carte liée à la carte physique connecté à mon LAN
  • Carte2 : Carte Internal ( sans liaison à une carte physique ) : DMZ


2 - Debian ( le "client" ) qui possède une carte
  • Carte1 : Carte Internal ( sans liaison à une carte physique ) : DMZ




La configuration "simpliste" du routeur :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
root@FreeBSD:~ # cat /etc/rc.conf | grep -E '(pf_|gateway_)'
pf_enable="YES"
gateway_enable="YES"
root@FreeBSD:~ # pfctl -sr
scrub on lo0 all fragment reassemble
pass in all flags S/SA keep state
root@FreeBSD:~ # pfctl -sn
nat on xn0 inet from 10.10.10.0/24 to any -> (xn0) round-robin
root@FreeBSD:~ # pfctl -sR
Enabled
root@FreeBSD:~ # ifconfig xn1
xn1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=503<RXCSUM,TXCSUM,TSO4,LRO>
        ether 26:69:c8:7c:5a:68
        inet 10.10.10.1 netmask 0xffffff00 broadcast 10.10.10.255
        media: Ethernet manual
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
Du coté du client, tant que je fait de l'icmp, cela fonctionne

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
bashhar@GLPI:~$ netstat -arn4
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         10.10.10.1      0.0.0.0         UG        0 0          0 eth0
10.10.10.0      0.0.0.0         255.255.255.0   U         0 0          0 eth0
bashhar@GLPI:~$ ping -c 1 10.10.10.254
PING 10.10.10.254 (10.10.10.254) 56(84) bytes of data.
64 bytes from 10.10.10.254: icmp_seq=1 ttl=64 time=0.045 ms

--- 10.10.10.254 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.045/0.045/0.045/0.000 ms
bashhar@GLPI:~$ ping -c 1 10.10.10.1
PING 10.10.10.1 (10.10.10.1) 56(84) bytes of data.
64 bytes from 10.10.10.1: icmp_seq=1 ttl=64 time=0.649 ms

--- 10.10.10.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.649/0.649/0.649/0.000 ms
bashhar@GLPI:~$ ping -c 1 1.1.1.1
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
64 bytes from 1.1.1.1: icmp_seq=1 ttl=55 time=26.6 ms

--- 1.1.1.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 26.616/26.616/26.616/0.000 ms

Par contre, en tcp ou en udp ...
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
bashhar@GLPI:~$ ping perdu.com
ping: perdu.com: Temporary failure in name resolution

bashhar@GLPI:~$ ssh 192.168.142.1 -p 2222

ssh: connect to host 192.168.142.1 port 2222: Connection timed out

J'ai testé cette configuration en dehors de XCP-NG ( -> VirtualBOX ) et cela fonctionne. Auriez-vous une explication à ce comportement ? Et un moyen de résoudre le problème