I have recently started hosting my server from my PC and everything worked perfectly until my public IP changed. I taught I have successfully setup a static IP but I didn't. Now I am in a loop of having static IP with no internet access or dynamic one... Currently my /etc/network/interfaces file looks like this:
source /etc/network/interfaces.d/* auto lo iface lo inet loopback
auto enp2s0 (that's my adapter name, I have confirmed it)
iface enp2s0 inet static address 178.223.89.110 The IP I want to have
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameserver 8.8.8.8 8.8.4.4
This doesn't work. When I check my PC uses that IP but my router doesn't provide internet to my PC.
Using this instead helps but it's not IP that I want and that my domain points to:
auto enp2s0 iface enp2s0 inet dhcp
If you need any further data feel free to ask and I will be sure to provide. system: Debian 12 Bookworm my domain is provided my hostinger
Thanks for the help in advance!
The IP I want to have
you don't decide your public IP address, your internet provider does