Set static IP address -> Web interface unreachable

  • Hey guys.


    tl;dr: Whenever I set a static IP, I cannot reach the web interface anymore.


    Details:
    I just installed OMV, connected it to my home LAN and accessed it via the web interface. As advised in the docs, I decided to set a static IP address. Since DHCP had given me 192.168.0.132 and the guide says to pick an address outside of the routers DHCP range, I chose:

    IP 10.0.0.2

    Subnet 255.255.255.0

    Gateway 193.168.0.1


    After applying the changes, I was not able to reach the web interface (neither the new nor the old IP). So I plugged in keyboard+monitor and used omv-firstaid to reset the connection. I then tried again with IP 193.168.255.222 , but still no luck.


    Any ideas what I'm doing wrong? I never managed to get a grip on this whole ipconfig stuff, so even the most simple and obvious solutions would be appreciated. :)


    [I currently cannot access the routers admin interface because my flatmate has the password and is asleep right now. Hopefully that can be amended tomorrow.]

  • KM0201

    Approved the thread.
    • Official Post

    Why are you trying to set it outside the range of what the DHCP server likely provides? (ie, 192.168.0.2-255). I guess I see why you'd pick an address outside the DHCP range (I havent in 12yrs).. but with 255 IP's available, seems like an unecessary hassle.


    The easier way to do this, would be to only allow the DHCP server to hand out IP's in a certain range (say, 192.168.1.2 - 192.168.1.200) then assign your server 201, which is outside that range.


    I've never saw someone try to give an IP address that is completely different than the router IP, but i guess it could be done. Below, my range is obviously set to .100-.249, frankly, this is fine with me. When I clean install OMV, I've used .166 for so many years, setting that IP is like the 2nd thing I do after changing the admin password. It keeps me from having to reconfigure my clients. I guess with the range my router has, I could make it something like 192.168.1.50 and I'd never have a risk of a conflict... Or change my DHCP server to only give out IP's from .2-.165, and then I'd never have a risk


    • Official Post

    Details:
    I just installed OMV, connected it to my home LAN and accessed it via the web interface. As advised in the docs, I decided to set a static IP address. Since DHCP had given me 192.168.0.132 and the guide says to pick an address outside of the routers DHCP range, I chose:

    IP 10.0.0.2

    Subnet 255.255.255.0

    Gateway 193.168.0.1

    You also need to set some value in the DNS field, usually the same as the gateway or add something like 1.0.0.1 separated with a comma, in this case it could be:

    193.168.0.1,1.0.0.1

    You did it?

  • Why are you trying to set it outside the range of what the DHCP server likely provides?


    I don't know. Why does the Setup Guide recommend it? I suspect the reason is to prevent accidential address collisions.


    You also need to set some value in the DNS field, usually the same as the gateway or add something like 1.0.0.1 separated with a comma


    I did put a public DNS server in the "DNS servers" field under Advanced Options (5.9.164.112). I also just tried again with my Gateway address as DNS server, but still no luck.

    • Official Post

    Why does the Setup Guide recommend it? I suspect the reason is to prevent accidential address collisions.

    The guide recommends it precisely for this reason, to avoid accidental collisions. But the normal thing is to use a similar network range, change only the last octet and limit that octet in DHCP to a certain possible number of IP addresses. Do not completely change network range.

    • Official Post

    That configuration seems correct. If it still doesn't work I would use omv-firstaid to reset the network interface to DHCP and then set a static IP.

  • The IP should be outside what the DHCP server hands out, but it still has to be on the same subnet. It needs to be on 192.168.0.x to be reachable. Set it to (IP)192.168.0.254/(Subnet mask)255.255.255.0/(Gateway)192.168.0.1 and then you should be able to get to the interface. Oh, and the DNS should be 192.168.0.1 as well. You can put the Google DNS servers as secondary, but use the local router/modem as the main DNS.

    Home OMV System -
    Current version of OMV (Always kept up to date)
    Intel Core i5-2400 CPU @ 3.10GHz
    8GB RAM / 120GB SSD for OS
    2X 2TB 7200RPM drives in a RAID1 for data
    Work OMV System -
    Current version of OMV (Always kept up to date)
    HPE DL360 server
    32GB RAM / 2X 300GB SAS in RAID1 for OS
    6X 1.2TB SAS drives in RAID5 for data
  • Yes, I have used OMV-firstaid multiple times to reset to DHCP, then tried again. I now also tried setting the IP directly via OMV-firstaid. The address set is successful, and the new IP is displayed at login in the shell. But the web interface remains unreachable unless I reset to DHCP.


    I get the feeling that this really is a problem with my router. I'll try to get access to it, then will post updates.

    • Official Post

    But the web interface remains unreachable unless I reset to DHCP.

    Ctrl+Shift+R

  • If you're setting static IP addresses outside of the 192.168.0.X subnet, they'll never work. Try my suggestion posted above.

    Home OMV System -
    Current version of OMV (Always kept up to date)
    Intel Core i5-2400 CPU @ 3.10GHz
    8GB RAM / 120GB SSD for OS
    2X 2TB 7200RPM drives in a RAID1 for data
    Work OMV System -
    Current version of OMV (Always kept up to date)
    HPE DL360 server
    32GB RAM / 2X 300GB SAS in RAID1 for OS
    6X 1.2TB SAS drives in RAID5 for data
    • Official Post

    Also check this

    Considering he can apparently log in, I highly doubt that's the issue.


    I mostly agree w/ Robroye on this. If he wants to set it outside the DHCP range, he's going to need to log in to his router and set his DHCP range, then put his server outside that range.. I believe routers cannot hand out more than 254 IP's (ie,192.168.1.254) so going over that is pointless.


    Only thing we disagree on, is his DNS settings.


    I don't think his router's IP will resolve that, as those are set by his service provider in most circumstances. I know he can't log in to the router, but usually you'll find your providers DNS somewhere in the router's web management tool. The simple way to test if your DNS servers are the issue, is just use Google's DNS (8.8.8.8,8.8.4.4) and see if that works correctly. I think most folks use Google's DNS anyway... I have for years.

  • I believe routers cannot hand out more than 254 IP's (ie,192.168.1.254) so going over that is pointless.

    Correct. IPv4 uses a 32 bit address space comprised of four 8 bit segments, a.k.a octets, seperated by the decimals. 8 bits numerically can only address 256 unique numbers (0 - 255), so each octet can be a number from 0 - 255. Anything over 255 is not valid.


    It is common practice to not use 0 or 255 in the last octet.

    • Official Post

    Considering he can apparently log in, I highly doubt that's the issue.

    Wrong thread.

    I mostly agree w/ Robroye on this. If he wants to set it outside the DHCP range, he's going to need to log in to his router and set his DHCP range, then put his server outside that range.. I believe routers cannot hand out more than 254 IP's (ie,192.168.1.254) so going over that is pointless.

    We are actually all saying the same thing in many different ways.

    I don't think his router's IP will resolve that,

    Why not? The DNS established on the router should resolve the requests. If it does not resolve them, they are forwarded to the alternate DNS. Not knowing the network settings is the best advice, there could be a DNS server or other settings on the router that would be of no use if you don't set your gateway as DNS.

    • Official Post

    Wrong thread.

    We are actually all saying the same thing in many different ways.

    Why not? The DNS established on the router should resolve the requests. If it does not resolve them, they are forwarded to the alternate DNS. Not knowing the network settings is the best advice, there could be a DNS server or other settings on the router that would be of no use if you don't set your gateway as DNS.

    He literally posted a screenshot of him logging in in post #6


    I don't know, I've never used my router IP to resolve DNS issues. Not saying it won't work, just never done it.


    If he doesn't know his DNS servers, and does not want to use Google's as I suggested... They are easy to get (naturally he would have to be connected to the Internet as I said above).


    Code
    resolvectl status | grep "DNS Server"


    No matter what DNS he's using, that will return the IP's for them and he can just use the IP's (Obviously I'm using Google's DNS).


    Code
    root@openmediavault:~# resolvectl status | grep "DNS Server"
       DNS Servers: 8.8.8.8 8.8.4.4
    root@openmediavault:~# 
  • There is no real need to set a static ip anymore. Just use local DNS / Avahi / WSD.


    I can reach my server with "servername", "servername.local" and "servername.fritz.box" (Fritzbox is a popular router in Germany). And that also works with IPv6.


    For DNS local cached DNS from your router is faster and its also possible to configure more secure DNS over TLS (DoT) for all devices in your network at once if your router supports that.

  • Using the local router's IP for DNS is the completely standard way to do it. If you set it to DHCP, the DNS IP you get is the local router. Using DNS that is outside the network is not an advisable thing unless you never want to manage any internal DNS. I use internal DNS extensively, so make sure the local router is my primary DNS. On my Windows domain controller (only a couple machines use it) the local router is listed as the secondary DNS so I can fully manage all DNS for the entire network, whether on domain or not.


    I also always always set a static IP on any network server or printer. 25+ years in IT have shown me that you always (did I mention always) set it to a static IP. If you combine not using a static IP, and using external DNS, you have a recipe for not connecting. External DNS has no idea of your local IPs handed out by the DHCP server, so has no way to resolve the names to an IP.


    Trust me on this, use the settings I gave above and it will work just fine.

    Home OMV System -
    Current version of OMV (Always kept up to date)
    Intel Core i5-2400 CPU @ 3.10GHz
    8GB RAM / 120GB SSD for OS
    2X 2TB 7200RPM drives in a RAID1 for data
    Work OMV System -
    Current version of OMV (Always kept up to date)
    HPE DL360 server
    32GB RAM / 2X 300GB SAS in RAID1 for OS
    6X 1.2TB SAS drives in RAID5 for data

    Edited once, last by RobRoye ().

  • Yes, I have used OMV-firstaid multiple times to reset to DHCP, then tried again. I now also tried setting the IP directly via OMV-firstaid. The address set is successful, and the new IP is displayed at login in the shell. But the web interface remains unreachable unless I reset to DHCP.


    I get the feeling that this really is a problem with my router. I'll try to get access to it, then will post updates.

    thanks dervonnebenaan - OMV-firstaid fixed the issue for me :D

    • Official Post

    Unfortunatelly now OMV-firstaid is no longer working - seems file disapeared (Rasbery Pi4) - Any ideas how to fix that? Is it possible to reinstall OMV without loosing all the data and setup?

    Pretty sure you could just run the omv-extras install script again, as long as you've not purged the OMV config files

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!