On my VPS(CentOS 7), I was trying configure OpenVPN + PiHole. During the process I had to restart the networking. Afterwards the networking got broken and locked me out. Now I can only access my Droplet from the console in the Digital Ocean control panel.
Once I'm in, I can see that everything works as expected(Apache, SSH, Gitlab, etc.) but since my networking is down, nothing can be accessed from the outside.
I tracked down the root cause of the problem to broken eth0
settings. I don't believe it's a firewall issue. My IP and Netmask settings were broken. They were falsely changed by Pi-Hole. I tried fixing them but I still get the same error message I got before trying to fix my settings when I execute systemctl status network
:
How should I proceed?
Update 1
ifcfg-eth0
:
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
IPADDR=104.248.31.98
PREFIX=24
GATEWAY=104.248.16.1
DNS1=208.67.222.222
DNS2=208.67.222.220
USERCTL=no
route -n
:
Update 2
route -n
after reboot:
ip a sh
: