Centos 7 - Can't ping or ssh

Issues related to configuring your network
kironet
Posts: 5
Joined: 2018/03/05 08:53:16

Centos 7 - Can't ping or ssh

Postby kironet » 2018/04/19 14:53:45

Hi,

today at 3AM(CEST) my VPS went down(problem on OVH's side), they moved my VPS to another host or something. Problem is, that after server went down a can no longer access(ssh or ping) my server(only in rescue mode). They are saying that if server is accessible in rescue mode, it's problem in OS configuration.

Since I can't even ping the server, problem must be in networking? I compared rescue mode resolv.conf and hosts with normal mode and they are the same -_-

Can somebody help me to solve this?

Thanks

tunk
Posts: 302
Joined: 2017/02/22 15:08:17

Re: Centos 7 - Can't ping or ssh

Postby tunk » 2018/04/19 15:33:54

It could be that the NIC got a new MAC address, and that you have to update the network script in /etc/sysconfig/network-scripts/
Run ifconfig and compare to the script.

kironet
Posts: 5
Joined: 2018/03/05 08:53:16

Re: Centos 7 - Can't ping or ssh

Postby kironet » 2018/04/19 15:43:14

Hi, thanks for the reply.

Which script do you mean?

Image

Here is ipconfig in rescue mode:

Code: Select all

root@rescue-pro:~# ifconfig
eth0      Link encap:Ethernet  HWaddr fa:16:3e:81:81:1b 
          inet addr:54.**.**.1  Bcast:54.**.**.**1  Mask:255.255.255.255
          inet6 addr: fe80::.../64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:18163 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12325 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:42287385 (40.3 MiB)  TX bytes:1418759 (1.3 MiB)

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:50 errors:0 dropped:0 overruns:0 frame:0
          TX packets:50 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:9908 (9.6 KiB)  TX bytes:9908 (9.6 KiB)




Here is output of ifcfg-eth0

Code: Select all

BOOTPROTO=dhcp
DEVICE=eth0
HWADDR=fa:16:3e:81:81:1b
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
ZONE=


Here is output of ifcfg-eth0:1

Code: Select all


DEVICE="eth0:1"
IPADDR="54.**.**.**9"
NETMASK="255.255.255.255"
ONBOOT=yes
Last edited by kironet on 2018/04/20 11:00:45, edited 1 time in total.

User avatar
TrevorH
Forum Moderator
Posts: 22598
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Centos 7 - Can't ping or ssh

Postby TrevorH » 2018/04/19 15:50:02

Unless you're in rescue mode right at the moment, your server is responding to ssh already.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

kironet
Posts: 5
Joined: 2018/03/05 08:53:16

Re: Centos 7 - Can't ping or ssh

Postby kironet » 2018/04/19 15:51:54

Yes, my server is not responding to ssh in normal mode.
I can't even ping to that server in normal mode.

I can do whatever I want in rescue, but when I switch to normal, server is dead. :(

User avatar
TrevorH
Forum Moderator
Posts: 22598
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Centos 7 - Can't ping or ssh

Postby TrevorH » 2018/04/19 15:52:37

It is responding right now.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

kironet
Posts: 5
Joined: 2018/03/05 08:53:16

Re: Centos 7 - Can't ping or ssh

Postby kironet » 2018/04/19 15:54:46

Check it right now, I switched to normal mode.

Hope I didn't confuse you.

When I'm in rescue mode I can: ssh, ping
When I'm in normal mode I can: nothing(can't ssh, can't ping)

User avatar
TrevorH
Forum Moderator
Posts: 22598
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Centos 7 - Can't ping or ssh

Postby TrevorH » 2018/04/19 16:12:52

Do you have console access to it? Is it booting at all?
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke