How to change static IP address?

  • I have multiple problems. I have a static IP for my OMV (I am using raspberry pi 4 8GB), but I moved to another house and the router has a different IP now.

    Because of that I can't connect to the OMV with the web gui. I could fix it using omv-firstaid, but I have another problem. My HDMI output doesn't work with my monitor (or with my older TV). So I can access the files only by editing them directly from the SD card. I can't use SSH or firstaid. I tried editing the config.txt (hdmi_force.... mode....), but the hdmi still doesn't working (the cable is good, I tested it). Can I edit a file to change my IP, or just set it back to automatic IP from the router? Or should I somehow connect it directly to my laptop with the ethernet and than could I use this connection to connect to it through SSH or web gui?


    Any idea?

  • OMV uses https://netplan.io/


    So you could edit /etc/netplan/*.yaml based on these examples https://netplan.io/examples/

    Interesting... I never knew this... mine is 20-openmediavault-enp1s0.yaml


    So I could change my IP (192.168.1.166)... and that would change it? I would think the webUI would overwrite that file once he restarted...

    Air Conditioners are a lot like PC's... They work great until you open Windows.


  • So I changed the gateway from 192.168.0.1 to 192.168.1.1 (that's what my new router uses). And ofc I changed the adrreses part from ...0.23/24 to 1.23/24.

    OMV didn't overwrite it, but it didn't connect either. What should I do? Or how could I set it to automatic IP again?


  • Isn't it possible to "chroot" your sd card on a running linux computer and do the changes you need?


    Some more expert advice is requested.


    There's also a way to set a wpa_supplicant file on the fat32 partition for Wi-fi connection on 1st boot but I don't know if it will work after OMV installed.


    When I get to my PC, I'll post it here

  • Why so complicated ?

    Just give your PC a static IP address from the "old" range (e.g. 192.168.0.123)

    ssh into your OMV box using it's old static IP,

    use omv-firstaid to change the IP address into one from the new range.


    Cheers,

    Thomas


    PS: Don't forget to change the IP address of your PC again.

  • Maybe I am not understanding something. What should I do? The server's ethernet port isn't blinking green, only stable yellow. If I change only my laptop's IP than how could I SSH into that? Also I can't give my laptop an IP from the old range because my router doesn't work with that. What am I missing?

  • Okey, I tried it nothing happaned, because it need to use the sudo netplan apply command, but I can't because I have no access to the terminal at all. What should I do?

    I thought it will be applied during boot. May be try a simple configuration with DHCP.

  • The server's ethernet port isn't blinking green because there is no traffic, does it have a link ? (maybe check that on your router)

    If you change your laptop's IP to one from the old range you can ssh into your server using it's old static IP.

    Maybe your router doesn't work with the IP addresses from the old range, but the builtin switch doesn't care about IP addresses.

    Just give it a try, it really can't do any harm.

  • I thought it will be applied during boot. May be try a simple configuration with DHCP.

    Ohh I didn't change the MAC address part, I need to change that too I think.


    The server's ethernet port isn't blinking green because there is no traffic, does it have a link ? (maybe check that on your router)

    If you change your laptop's IP to one from the old range you can ssh into your server using it's old static IP.

    Maybe your router doesn't work with the IP addresses from the old range, but the builtin switch doesn't care about IP addresses.

    Just give it a try, it really can't do any harm.

    It always has traffic from the start, but I ofc checked it didn't connect to the router in the first place.

  • ... hmm, wouldn't it be easier to change the network from the router temporarily?

    Change the network to 192.168.0.1, enter your OMV from a PC (configured in DHCP), change the IP of your OMV to 192.168.1. (Whatever). You will lose the connection. You enter your router and configure the network again in 192.168.1.1. Ready.

    OMV 5, Intel core i3 3225, 8GB RAM, PendriveUSB system, ZFS RaidZ 5xWD Red 4TB, 1x120GB SSD Docker

    I DO NOT SPEAK ENGLISH. I translate with google, sorry if sometimes you don't understand me well:)

    Make a backup now. You don't want to miss it next week !!

Participate now!

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