0

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!

7
  • 1
    The IP I want to have you don't decide your public IP address, your internet provider does Commented Mar 5 at 22:02
  • You can set a static IP on your computer, but that doesn't impact the IP address that rest of the world sees you have. You need to talk to your service provider because THEY are the ones who control the IP address that is important here. Commented Mar 5 at 22:23
  • Yeah, about that. I should have added that that IP is the one I had on that day when I have setup everything. I didn't just pick it, it was one of my previous addresses. @JaromandaX
    – Uros
    Commented Mar 5 at 22:24
  • @music2myear Sorry if I don't understand because of my limited networking knowledge but I just want my domain to point to my PC. I have setup my domain to point to that address and that's why I want it not to change. If you have nay other suggestion for my problem I will gladly try it. Basically I want static IP as I am using that PC for my server. If I if it changes I can't access my website nor my PC over ssh.
    – Uros
    Commented Mar 5 at 22:27
  • 2
    google stuff like dyndns and no-ip
    – Gantendo
    Commented Mar 5 at 22:31

0

You must log in to answer this question.

Browse other questions tagged .