-2

I install Linux in VMWARE on a dedicated server but I do not have any internet connection. I can not ping anything. What should I do to have an internet connection?

I tried ubuntu, centos and different versions of them but still no internet connection. when I use the command IP a or ifconfig. It just show me a IO and nothing else.

1
  • You mean VMware, maybe?!? So you are not able to ping 127.0.0.1? What network setup have you chosen? Changing die guest OS will not help, if your VMware is not connected. Commented Jul 16, 2023 at 18:33

1 Answer 1

1

for this first go to this location

cd /etc/sysconfig/network-scripts/

then use this command

ifconfig

you can see 2 flags one of them should be IO you should see what is the other flag name is. for example if it was eth0, in this location type

nano ifcfg-eth0

then paste this into this file remember change your IP, subnet mask and your gateway

TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens33
UUID=e6dd2f58-fc77-497f-a7ce-28e35ac4ba52
DEVICE=ens33
ONBOOT=yes
IPADDR= "YOUR IP"
PREFIX="SUBMASK"
GATEWAY="GATEWAY"
DNS1=8.8.8.8

then restart your centos and you should have internet.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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