https://rancher.com/ logo
#rancher-desktop
Title
# rancher-desktop
o

orange-thailand-83295

07/19/2022, 7:55 AM
Hello, I come here because I have a problem since my company moved from Docker desktop to Rancher desktop and I didn't found a response on Internet. We have a container which need to request the host but I can't seem to ping
host.docker.internal
I tried on a new container, it does not work too. Step i've done : Firewall rule
New-NetFirewallRule -DisplayName "WSL" -Direction Inbound -InterfaceAlias "vEthernet (WSL)" -Action Allow
New container
docker run -d -p 80:80 docker/getting-started
Ping :
docker exec -it containerName sh
/ # ping -c 2 host.docker.internal
PING host.docker.internal (172.17.32.1): 56 data bytes
--- host.docker.internal ping statistics ---
2 packets transmitted, 0 packets received, 100% packet loss
Do you have an idea ? Thank's
I forgot somme infos : I use rancher-desktop 1.4.1 on Windows with kubernetes desactivated The Firewall rule comes from the Rancher desktop FAQ The ip adress resolved for host.docker.internal is vEthernet (WSL) on ipconfig on host
c

calm-sugar-3169

07/19/2022, 5:32 PM
@orange-thailand-83295 what is the entry for
host.rancher-desktop.internal host.docker.internal
in the /etc/hosts “?
Rancher desktop by default points the
host.rancher-desktop.internal host.docker.internal
to wsl interface
vEthernet (WSL)
IP address. If this does not meet your requirement or you may need to point those entries to other IP address other than WSL interface itself, you can manually do this.
o

orange-thailand-83295

07/20/2022, 9:04 AM
Thank's for your answer. The IP is Ok for me but I don't understand why I can't request it. ping or curl 172.17.32.1 (In my case) from container should work, no ? Have I missed something ? Sorry for my bad network knowledges and thank's for your help
(What I need is to send request to my Wilfly server hosted on Windows from my container)
c

calm-sugar-3169

07/21/2022, 6:18 PM
what IP address or network interface is you Wilfly server is listening on?
Also, can you please confirm if the firewall rule is actually created? it looks like the requests are getting blocked by the firewall
o

orange-thailand-83295

07/22/2022, 7:02 AM
My Wildfly server is on localhost:8080 (Windows) Result of
Get-NetFirewallRule -DisplayName WSL
Copy code
PS C:\WINDOWS\system32> Get-NetFirewallRule -DisplayName WSL


Name                  : {4ee8a2d5-388a-41cd-a0b6-a97a4ffd56b2}
DisplayName           : WSL
Description           :
DisplayGroup          :
Group                 :
Enabled               : True
Profile               : Any
Platform              : {}
Direction             : Inbound
Action                : Allow
EdgeTraversalPolicy   : Block
LooseSourceMapping    : False
LocalOnlyMapping      : False
Owner                 :
PrimaryStatus         : OK
Status                : La règle a été analysée à partir de la banque. (65536)
EnforcementStatus     : NotApplicable
PolicyStoreSource     : PersistentStore
PolicyStoreSourceType : Local
I can ping WSL from container I can ping Windows (172.17.32.1) from WSL But I can't ping Windows from container
a

acoustic-bird-20495

10/13/2022, 10:13 AM
I am facing same issue. Does anybody help in it?
103 Views