virtualbox ping, telnet works but not curl
Asked Answered
P

1

6

I am using cuckoo sandbox for malware analysis. I have a virtualbox vm which has the IP set to 192.168.56.101. When the vm is powered on, there is a script agent.py which listens on port 8000. The network is host-only configuration on the virtualbox side. The host-only adapter has the IP set to 192.168.56.1

When the VM is in power on state,

the guest(192.168.56.101) is able to ping host (192.168.56.1)

ping_guest_to_host

the host(192.168.56.1) is able to ping the guest (192.168.56.101).

ping_host_to_guest

Telnet works for the host IP(192.168.56.101) at the Port(8000).

telnet_host_to_guest

When I try curl it fails and I'm responded with the error message

ERROR: The requested url could not be retrieved.

curl_host_to_guest

However when I enter the same IP and port combination, I'm greeted with the success message instead of the error.

I'm in a university network and hence need to use proxy. I feel the proxy is the culprit and hence tried to disable it by unsetting it at the command line but for no success.

What could be the reason for this? Proxy or any other settings internally? Posting the screenshots for reference.

Peaked answered 14/5, 2019 at 20:36 Comment(5)
You published the telnet result twice.Heptateuch
There is no screenshot for the fail? When I try curl it fails and I'm responded with the error message ERROR: The requested url could not be retrieved. Is the url using a hostname ?Ricketts
However when I enter the same IP and port combination, I'm greeted with the success message instead of the error. when you enter? enter how? if you mean when i enter it in my web browser which is configured to connect via the proxy, it works fine. then the problem is that you haven't told curl to use the same proxy ..Sandfly
Your screen shots don't match with what you say.Chairborne
It could be a squid configuration problem. Are you using a reverse proxy? this old post could help: linuxquestions.org/questions/linux-server-73/…Roommate
P
1

In fact, the curl is working correctly. Look at the answer: curl worked without errors, but the answer came from you, with an error from Squid "The requested URL could not be retrieved". Therefore, I believe that the reason in the proxy server

Phototube answered 23/5, 2019 at 5:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.