0

I have qemu guest instance which has an interface with 192.168.0.4 static ip address. Also there is virtual interface tap0 without ip address and br0 which has 192.168.0.3 ip address on the host.

There are the commands which I used to set up bridge:

ip link add br0 type bridge
ip addr flush dev br0
ip addr add 192.168.0.3/24 brd 192.168.0.255 dev br0
ip tuntap add mode tap user $(whoami)
ip link set tap0 master br0
ip link set dev br0 up
ip link set dev tap0 up

A web-server is running inside qemu. When I try to perform simple get request with curl like this curl 192.168.0.4:8080 from the host, I get No route to host error message. But if I perform the same request by python httplib.HTTPConnection("192.168.0.4:8080"), I receive response 200 OK.

Could you please give me an advice to solve this issue with curl.

  • 1
    You're using IP addresses which belong to the US Department of Defense. If you are not in the DoD you should probably fix that. – Michael Hampton Mar 29 at 14:00
  • @michael-hampton fixed – rinatdobr Mar 29 at 14:09
1

I believe that curl is using proxy settings retrieved from environment variables and that proxy does not know a route to 192.168.0.0/24 network.

Please, try the following:

$ curl --verbose --noproxy '*' 192.168.0.4:8080
  • Thank you! Your command is working :) – rinatdobr Mar 29 at 14:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.