internet is not working in virtualbox linux(CentOS 7) - virtualbox

Internet is not working in my virtual machine (CentOS 7)
I don't know where to start...
machine has two network adapter, NAT and Host
I can ping among virtual machines such as "ping slave1" "ping slave2" .... it works just fine
ping 8.8.8.8
-> PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
after this message, nothing comes out..
ping google.com
-> no any message comes out for a while and it says "ping: unkown host google.com"
enp0s3 -> NAT(on)
-> inet 10.0.2.15
-> netmask 255.255.255.0
enp0s8 -> host(on)
-> 192.168.56.101
Where should I start to figure it out?
Please I am spending more than 17 hours for this...

The Netwrok adaptateur must be :
Enabled
Attached to Bridge Adapter
Then in the virtual machine, open the Network Connections configuration and configure to Obtain an IP address automatically and Obtain DNS server address automatically

Related

host a WebApplication in Vmware with shared Internet Network with Host-Machine

I have Windows 7 as a Host OS on my PC, It's Connected to the Internet.
I have a Win-Server 2016 on my VMware workstation. Its my Web-Application's host.
Win-Server is Connected to the internet through my host os (Win 7) using a NAT connection.
I want to host my webApplication in this VM (winServer 2016) which has a shared Internet connection.
My Win-Server Connection has this Local IP Address: 192.168.111.19
My Win7 has this Local IP Address: 192.168.111.1
Both of them are Connected to the Internet using (something like) this IP: 86.10.15.20
When I host my Application in Win7, it will works through my Internet IP (86.10.15.20)
But When I host, my Application on Win-Server (in VM), I doesn't work at all.
Actually I don't know what Scenario I must implement to achieve this goal. Please note, what should I do ?
Sounds like you need to update the NAT rule to point to the Win-Server VM IP address instead of you Win7 IP address. This is normally done at the router level.

unable to ssh from host(windows 7) to linux installed on virtual box

i have installed redhat linux on virtual box running on windows 7 hostmachine.
Now i need to ssh from windows to linux.
windows ip address 192.168.1.152
gateway: 192.168.1.2
ethernet adapter virtual box hostonly network
ip address 192.168.56.1
Linux ip address 10.0.2.15
gateway 10.0.2.2
i am able to connect to internet from linux. Please suggest how to ssh.
Virtual networking you used is NAT, if you want to connect to redhat via ssh then add port forwarding rules in virtual box.
And use localhost as IP address in putty.
Make sure SSH daemon is running in redhat.

Access Virtualbox guest from computer that is NOT host

I have a computer, let's call it linux#home.
I have a dedicated distant linux server, let's call it linuxHost#datacenter.
I have a virtualbox virtual machine running windows 7 on the dedicated server, let's call it windowsGuest#datacenter.
I set up a NAT network interface on windowsGuest through virtualbox manager.
windowsGuest#datacenter is running a service that needs to access an sql database on linuxHost#datacenter, and that works fine. The same service on windowsHost needs to listen to connections on an udp port, let's say 12345. windowsGuest can access internet, web browsing works properly (doesn't need to, but that works fine).
So, now i need linux#home tu run a client application that connects on udp port 12345 on windowsGuest#datacenter. What i did is configure a port forward on the NAT network i use for windowsGuest :
-host ip : 127.0.0.1
-host port : 12346
-protocol : UDP
-guest ip : 10.0.2.4 (which is windowsGuest#datacenter ip address)
-guest port : 12345
I expect that any connection on linuxHost#datacenter on UDP port 12346 would be forwarded to windowsGuest#datacenter UDP port 12345, but that doesn't seem to happen.
a few more information :
- windowsGuest#datacenter's firewall is turned OFF
- linuxHost#datacenter runs iptables and is configured to allow any connection from linux#home, both tcp and udp.
- linuxHost#datacenter 's iptables doesn't log any blocked packets.
- I don't want to turn off iptables since linuxHost#datacenter is running other services and i don't want to expose that.
- I cannot test the client application on linuxHost#datacenter
What did I do wrong? Should i manually forward connections from internet to linuxHost#datacenter on port udp 12346 to 127.0.0.1:12345? should i configure the NAT port forwarding differently? Am i totally wrong and that's not the way i should manage this situation?
Thanks to this answer i could manage what i wanted. I had to modify my NAT port forward in the virtualbox manager preferences. The host ip field can be left blank, so that connections from any ip address would be forwarded to the guest.

Google Compute Engine not reachable from selected external hosting (GoDaddy)

I've developed a simple node.js application which lives in a customized Docker container (based on the node:carbon image).
The docker run command is:
docker run -p 8087:8087 --restart=on-failure -t --name=$RUN_NAME \
--env-file $DEV_ENV -d $CONTAINER_NAME:$CONTAINER_TAG
My webserver should be responding on port 8087 and it is from inside the container and from outside the vm by calling it from some other servers (not in Google Cloud).
My problem is that I should call it from my GoDaddy Linux hosting (curl call) and it's not reachable from there:
* About to connect() to x.x.x.x port 8087 (#0)
* Trying x.x.x.x... Connection refused
* couldn't connect to host
* Closing connection #0
curl: (7) couldn't connect to host
Note: I've opened the firewall for
the 8087 port.
Please help
Since you say that you've checked from other external hosts, have you considered that GoDaddy might be blocking outbound traffic to port 8087 (possibly due to port-scanning or other bad behavior)?
You should be able to rule this out by starting a service on 8087 on a non GCP VM, and testing whether curl from GoDaddy is able to reach it.
Right now, from your description, it sounds like:
VM -> localhost -> VM : works
External -> internet -> VM: works
GoDaddy -> internet -> VM: fails
If other external hosts work, I'd start to suspect GoDaddy, assuming that you've ensured that your firewall rule is actually open to 0.0.0.0/0 and not some smaller subnet.

VMware have network access but can't ping anywhere

I am using VMware 9.0.0 on a Windows 7(64bits) host, the guest OS is CentOS 6.5(I have tried Ubuntu 12.04 also).
Firewall on Windows 7 is completely disabled. My host is connected to a router via wireless network adapter.
Guest's network configuration is NAT, and guest IP address is 192.168.117.130. Default gateway of the guest is 192.168.117.2. The Nat Interface(VMware Network Adapter VMnet8) on Windows 7 have an IP address of 192.168.117.1.
The problem I met is that I can have Internet access, actually, every network service using TCP and UDP is ok. But I can't ping any host other than hosts on the network of 192.168.17.0/24.
I used wireshark to locate the problem. I found a strange phenomenon, my host can receive the ping echo request from the guest and ping echo response, but it is not forwarding to the guest. Seems the NAT of ICMP packet is not working.
Any suggestions?