IPv4 address changes automatically
Solution 1
You would have to set these as the picture given:
Your router's address is the same as default gateway. But, if your problem is external IP, there is more work needed.
Solution 2
'Somewhere over here' is quite accurate. Enter the static IP you want to use, the LAN IP of your router as standard gateway (e.g. 10.0.0.1), the subnet mask (e.g. 255.255.255.0) and the DNS server, which, when in doubt, should be set to the same IP as your standard gateway. I recommend configuring a static IP outside of the DHCP range. Otherwise, your server may claim an IP addresses already assigned to another machine on your network. The IP must however be in the same subnet, which likely means it has to start with the numbers 10.0.0.
Alternatively, you can continue using DHCP (obtain an IP address automatically) and instead ensure that your router assigns the same address to your server every time. This can be done through your router configuration, but the process is different for every router.
Related videos on Youtube
Imri Persiado
Updated on September 18, 2022Comments
-
Imri Persiado almost 2 years
I run a website on my computer using XAMP. It runs on port 8888, when I configure the port I need complete this ip: 10.0.0._ to my IPV4 which is 10.0.0.4 right now.
I don't know why but my IPV4 is keep changing which means that every time it changes I have to re-configure the port.
How can I change the IPV4 from dynamic ip to static? I guess it somewhere over here:
-
Ramhound over 10 yearsYou need to purchase a static IP Address from your internet provider. Your server itself already has a static local intranet ip address 10.0.0.4 but outside of your network thats not a valid ip address.
-
Colin 't Hart over 10 yearsYou don't need to configure the IP address in Apache, just port number is enough.
-
-
Rik over 10 yearsI wouldn't use 10.0.0.4 because if your computer is off it can be assigned to another device. If that happens and you turn on yours, you'll get an IP-conflict. Set it to something close to the router. Like 10.0.0.245. At least outside of the range the router assigns to other devices.