How to Set Static IP in Ubuntu Server 22.04

Поділитися
Вставка
  • Опубліковано 7 чер 2022
  • What's up, Guys!!! In this video, I walk through how to set a static IP address in Ubuntu 22.04 Server Edition. Ubuntu is a common server choice for beginners. It aims to be lean, fast, and powerful according to the official website. A large amount of online support is available for users who decide to use the Ubuntu server.
    Ubuntu Site: www.ubuntu.com/server
    Github: github.com/keepittechie/Ubunt...
    Please enjoy the video and if you have any questions, leave a comment down below. My goal is to expand the Linux community.
    Remember to Like, Share, and Subscribe if you enjoyed the video! Also if interested in more Linux content please consider becoming a Patreon so I can continue to produce great content!
    ✔️RECOMMENDED LINUX BOOKLIST
    -------------------------------
    Linux Pocket Guide: Essential Commands: amzn.to/3xGPvsK
    CompTIA Linux+ Certification All-in-One Exam Guide: Exam XK0-004 amzn.to/3uQ3wmh
    101 Labs - CompTIA Linux+ amzn.to/3vtj7rb
    How Linux Works: What Every Superuser Should Know amzn.to/3vrLkOO
    Linux Bible amzn.to/3rwEkPH
    ✔️SOCIAL NETWORKS
    -------------------------------
    KeepItTechie: keepittechie.com/
    Facebook: / keepittechie
    Twitter: / keepittechie
    Instagram: / keepittechie
    Discord: / discord
    CashApp: cash.app/$KeepItTechie
    Patreon: / keepittechie
    --------------------------------
    ✔️DONATE CRYPTO
    -------------------------------
    Bitcoin Address: bc1qgxzq9ck5nhud8ekmpt46l9u5gn3ty5w9n6mmd4
    Ethereum Address: 0xb8fC845963893644EEF435552F2B6bd30Ad012E3
    XRP Address: rKrUvWFT7hVtD5JCcCY9s2HFQZ5UHViLD
    Litecoin Address: LNfWvkcFVfKZXJV28dzU9g7FQ7FYtg5cFg
    Dash Address: Xu4VgqCkN4d1JKfzdjMNdb63Mfup3Cmnqx
    Zcash Address: t1fqyxF3pFtRDuz2Vprt4m5pXWa8rs97Swr
    --------------------------------
    #Ubuntu
    #StaticIP
    #Server
    #Linux
    #KeepItTechie
  • Наука та технологія

КОМЕНТАРІ • 176

  • @jasonthomas5647
    @jasonthomas5647 Рік тому +5

    Smooth! I love your videos and the background music as well. I’m setting up a new homelab with Ubuntu 22.04 and using all your videos for guidance. Your content is great because you show the simplest way to do things and you are very concise and thorough in a small amount of time. This is huge because Time is so precious and you literally increase the value of the time I spend learning all this great Linux stuff!! Thank you so much for what you do! I hope you keep putting out the great content. God bless! ✌️

  • @toddmartin7030
    @toddmartin7030 Рік тому

    Excellent video, thank you! Its been awhile since I've set up a linux server, most of the servers I stand up are BSD, so this video was a real life saver today!

  • @miguelg443
    @miguelg443 2 роки тому +3

    Life Saver! Im new to all of this, and your explanations are very helpful thanks!

  • @ColinAverill
    @ColinAverill Рік тому

    DUDE!!!! This worked and I didn't break anything!!! Baby steps.... Thank you!
    I'm trying to set up a home server/NAS and I find a video that teaches me one thing, but then I have to find another to learn another part, then find another video to learn another part. It's very frustrating and time-consuming. Linux kinda sucks. But I kind of love it.
    Thank you again for making this simple. I do just want to point out that at one point in the video, when you're creating the .yaml backup file (5:58), that not all of it shows up on screen. That was a little concerning at first, but I figured it out after I saw you did "ls" and it showed "[xxxxx]-config.yaml.bck", and not just "[xxxxx]-config.bck". Also I had to type in the entire .yaml address initially (4:40). pressing Tab twice did not work for me.

  • @matthewwilson9946
    @matthewwilson9946 Рік тому +1

    Just want to drop a comment to say thanks. This was doing my head in a little bit, not too used to HyperV and Ubuntu server did not want to install with a NIC. Had to remove prior to installation so was a bit wobbly.
    Thanks!

  • @joeb4790
    @joeb4790 9 місяців тому

    Thanks man this is a great easy to follow guide. Never had to do this without net tools until now.

  • @rkstreet63
    @rkstreet63 6 місяців тому +1

    You are really good at explaining things with just the right about of detail.

    • @KeepItTechie
      @KeepItTechie  6 місяців тому

      Thank you so much for the kind words! I'm glad you find the explanations helpful. If you have any more questions or need further assistance, feel free to ask. Always here to help!

  • @PatJones82
    @PatJones82 Рік тому

    Very helpful. Appreciate it, my friend! :)

  • @MetalElmmer
    @MetalElmmer 9 місяців тому

    That helped me out so much! Thank you, bro, for this!

  • @slazy9219
    @slazy9219 Рік тому

    Love your videos on this topic bro, greetings from Germany

  • @cabacajosepedro2879
    @cabacajosepedro2879 2 роки тому

    Thank you for useful information, very good!!

  • @Mchacz8008
    @Mchacz8008 Рік тому

    Thank you so much for the video, I was looking just for that!

  • @Radenska512
    @Radenska512 11 місяців тому

    Thanks for your help ^^ I kinda avoided the Netplan configuration type, cause last time I screwed up my connection to a VM badly. But you explained it very well

    • @KeepItTechie
      @KeepItTechie  11 місяців тому +1

      Yeah those ymal files are very sensitive. Glad I could help!

  • @zorroskullgar4698
    @zorroskullgar4698 4 місяці тому +1

    Sweet, many thanks dude!

  • @nodryland1564
    @nodryland1564 Рік тому

    Great content was very helpful keep up the good work Bro

  • @sambad8429
    @sambad8429 2 роки тому

    Thank you for these useful tips.

  • @kuroraiju
    @kuroraiju Рік тому +1

    Excellent tutorial, you made this look like a cakewalk!

  • @duckheadgaming
    @duckheadgaming Рік тому

    Thanks a lot, worked great and your explainations are perfect for beginners!

  • @victor2410
    @victor2410 Рік тому

    nice tutorial, your videos have been coming in very handy!

  • @personstandingup
    @personstandingup 4 місяці тому +1

    Amazing man thank you saved me so much time!

  • @Cj_prints
    @Cj_prints Місяць тому

    Brilliant! Thanks for the video.

  • @KenPryor
    @KenPryor Рік тому

    Very helpful. Thank you!

  • @mikhailplekhov3894
    @mikhailplekhov3894 2 роки тому

    Thank you very much! Very useful video!

  • @gianluigicl
    @gianluigicl Рік тому

    Tks for the help Man! 😁

  • @muzi7335
    @muzi7335 9 місяців тому

    Thanks bro, it worked as I expected.

    • @KeepItTechie
      @KeepItTechie  9 місяців тому

      You're welcome! Glad it worked for you!

  • @kimanicoates805
    @kimanicoates805 2 роки тому

    Thanks, this was really helpful

  • @victorsaramento9333
    @victorsaramento9333 Рік тому

    Thanks for the details. Great video XD

  • @tankareno
    @tankareno 8 місяців тому

    good stuff, just what I need

  • @devlinxji
    @devlinxji Рік тому

    Thankyou.. it's easy explain..

  • @wardog248
    @wardog248 Рік тому +1

    Thank you!!

  • @gourav3727
    @gourav3727 Рік тому

    Really helpful video, thanks a lot brother

  • @4arliEdinorog
    @4arliEdinorog Рік тому

    Мужик, ты лучший!

  • @johannschwengler529
    @johannschwengler529 10 місяців тому

    Bro thanks for help, respect from Kazakhstan)

  • @TheJohn48231
    @TheJohn48231 Рік тому

    Thank you for helping out a Linux noob, great video.

  • @cabacajosepedro2879
    @cabacajosepedro2879 2 роки тому +1

    Thanks! it works.

  • @tolgabp
    @tolgabp Рік тому +1

    thanks for useful information, well explained!

    • @KeepItTechie
      @KeepItTechie  Рік тому

      No problem!

    • @itztrimix
      @itztrimix Рік тому

      @@KeepItTechie hey, i keep getting error cannot remove 'filename.yaml' : Permission denied
      Do you have any solution for that, how to grant permission?

  • @monwabisisithaba7803
    @monwabisisithaba7803 7 місяців тому

    Thank you. Helped

  • @stuffthere2381
    @stuffthere2381 Рік тому

    Top man 👌 very good tutorial

  • @hv4329
    @hv4329 6 місяців тому

    great tutorial !

  • @syedhasnainabbaszaidi5052
    @syedhasnainabbaszaidi5052 Рік тому

    Thanks buddy 😘

  • @mattb7895
    @mattb7895 11 днів тому

    God bless you man, thank you for your service!

  • @steelcock
    @steelcock 2 роки тому +1

    thank you very much!

  • @saujanyamhatre7798
    @saujanyamhatre7798 Рік тому

    thanks brother it helped me out

  • @amraaamraa2153
    @amraaamraa2153 Рік тому

    Thank you so much sir. It's good for beginner me :>.

  • @domenico.freedom
    @domenico.freedom 8 місяців тому

    Bravissimo grazie

  • @charliesangha
    @charliesangha Місяць тому

    Thanks dude

  • @mustafamanhal
    @mustafamanhal Рік тому

    thank you so much !!!

  • @Ekklesia_Corner
    @Ekklesia_Corner 4 місяці тому

    The only thing I'll add to this, if you are using a server that preconfigures your server for you, when my server came up I followed this set of instructions. (I will say thank you very much to this gentleman because he's got the only tutorial out of about 30 that I've watched and read that actually tells you how to find the existing config file for ip. Being the curious nerd that I am I did the cat /etc/netplan/ then hit tab twice and hit enter and lo and behold there was my ip 4 and ip config file already in static mode. I'd hate for anyone to have to spend the time doing a new netplan config for nothing if you don't have to as yaml sucks in mho. Makes me love my vps company even more since it was set up in static already.

  • @ThePoot_tf2
    @ThePoot_tf2 8 місяців тому

    thank you for this video

  • @yellowbird100
    @yellowbird100 Рік тому

    tysm

  • @saidevpappu
    @saidevpappu 10 місяців тому

    Thanks mate..cheers 💘

  • @KB-ge4rn
    @KB-ge4rn 10 місяців тому

    Ty

  • @Dominik-bd7fx
    @Dominik-bd7fx Рік тому

    Thx for video, can i use my internet provider's dns servers?

  • @Leseul3d
    @Leseul3d 6 місяців тому

    merci!

  • @harryfender5636
    @harryfender5636 Рік тому

    Thanks Josh.

  • @julianballaci7968
    @julianballaci7968 Рік тому +1

    One big thank you

  • @vinodji5275
    @vinodji5275 8 місяців тому

    thanks a lot of you great job broo and please make another ipv6 with ipv4

  • @panjabbolda_47
    @panjabbolda_47 Рік тому

    U r great boss

  • @asithamahagamage7969
    @asithamahagamage7969 10 місяців тому

    තැන්ක්ස් අයියා😊😊

  • @muhammadusama-1
    @muhammadusama-1 Рік тому

    Thanks, One quick question what is 127.0.0.53 in DNS server ? I mean how its different from google cloudfare DNS

  • @juanc4065
    @juanc4065 Рік тому

    Thanks

  • @leebuckley4873
    @leebuckley4873 9 місяців тому

    Hi I have a static IP of 212 then a df gateway of 159 I'm trying to set a static IP for my home server so I can assess it outside of my home network but having some issues can you recommend anything that could help many thanks

  • @AM1media
    @AM1media 2 роки тому

    Techie!

  • @icleave
    @icleave 2 роки тому +7

    Since gateway4 deprecated, can you please update with routes: - to: default via: ?

  • @Fridge.
    @Fridge. 2 роки тому

    🔥🔥

  • @veterangaming9511
    @veterangaming9511 Рік тому

    Got lost the moment you went into the config file instructions. What is DHCP, how do I find that file, do I need DHCP, etc.?

  • @andrewgraham6994
    @andrewgraham6994 9 місяців тому

    My guy, You have skillz teaching. broski keeps the BS to a minimum💯✌

  • @hobbylasers
    @hobbylasers 6 місяців тому

    Are you able to do a quick video on how to configure a static ipV6 address on Ubuntu 20.04.1 LTS please? I've tried a number of times to follow online guides and each time I end up bricking my server because it becomes unreachable. It's a hosted VPS.

  • @TiredZero
    @TiredZero Рік тому

    it works with wifi too? or just Lan? I'm using an old laptop as a project server xD

  • @user-wg1tx8bu6w
    @user-wg1tx8bu6w 6 місяців тому

    Does anyone know how to install Xen hypervisor for Ubuntu 22.04 Lts? I’m having trouble with configuring the network interfaces and when I try to ssh into it there’s a connection error.

  • @mi4aprotv320
    @mi4aprotv320 8 місяців тому

    Does it give a static IP outside my network to access my system or inside my home network?

  • @royvincentniepes3734
    @royvincentniepes3734 Рік тому

    will this work in ubuntu under wsl?

  • @andyng-lt4dq
    @andyng-lt4dq Рік тому

    hi, it doesn't work when I ping to dns servers, I used routes via as well

  • @ike-lo7dq
    @ike-lo7dq 5 днів тому

    will this also work in debian lite for rasp-pi?

  • @todaysbibleteaching
    @todaysbibleteaching Рік тому

    I do not have that file in the folder that you told me to go into. My file is 1-network-manager-all.yaml and what is in there is let network manager manage all devices on this system network: version 2 renderer: networkmanager

  • @cedrickrause5469
    @cedrickrause5469 6 місяців тому +1

    Hey, urgently need your help. I followed the tutorial as said until I reached the point, where I would have needed to copy your code. Now I cant connect to theNetwork with my Server how do I make my Server use the file for the none staic Ip again. So how do I get it to use the file, which I put in bck again.

    • @KeepItTechie
      @KeepItTechie  6 місяців тому

      Here is what it should be for dhcp:
      network:
      version: 2
      renderer: networkd
      ethernets:
      your_interface_name:
      dhcp4: true

  • @arickthompson9833
    @arickthompson9833 Рік тому +5

    ' cat /etc/netplan/00-installer-config.yaml ' My system says "No such file or directory". I have a fresh install of the latest Ubuntu, also checked for updates

    • @vusumuzingozo1071
      @vusumuzingozo1071 9 місяців тому

      Did you manage to solve the issue?

    • @teambattleground9076
      @teambattleground9076 8 місяців тому

      cd into the netplan directory then create the file using nano "sudo nano static.yaml" from inside the directory and it will work.

    • @cruzinsweetsntreats
      @cruzinsweetsntreats 2 місяці тому

      You may have a different file. To see what file you use, run: *ls /etc/netplan*
      My default: *50-cloud-init.yaml*
      I am running Ubuntu 24.04 on ProxMox 8.2

    • @cruzinsweetsntreats
      @cruzinsweetsntreats 2 місяці тому

      @@teambattleground9076 and if you get permission warnings, you'll need to change the config file's permissions: *sudo chmod 600 /etc/netplan/static.yaml* or whatever you chose to name the file, to match that of your original. *netplan* under Ubuntu 24.04 was giving me just that.
      To compare the permissions with the backup file: *ls -lo /etc/netplan*

  • @marswong848
    @marswong848 Рік тому

    When i do sudo nano /etc/netplan/static.yaml,It somehow says "sudo:nano: command not found",I am not sure which part i have done wrong since i have followed the exact route in the video

  • @3170ccp
    @3170ccp 7 місяців тому

    how do you enable ssh?

  • @RKGraves
    @RKGraves Місяць тому

    Thank You - Very Helpful and I appreciate your time. Any chance you have a sample .yaml file showing both IPv4 and IPv6 settings? Again, Thanks!

    • @KeepItTechie
      @KeepItTechie  Місяць тому

      You're welcome! For IPv4 and IPv6 settings in .yaml: set addresses, gateways, and nameservers for both IPv4 and IPv6 in your network config file.

  • @ricardsandruzskis1574
    @ricardsandruzskis1574 Рік тому

    hello sir if my browser writes This site can’t be reached192.168.0.212 took too long to respond. What can be the problem. Pls help :(((((

  • @jasonthomas5647
    @jasonthomas5647 Рік тому

    Hi,
    I setup my static IP like this and when I login to my router it doesn’t list my device as connected but it is! Strange. So I set the reserve IP(in the router)the same as the server and now it is listed but says “reserve inactive” but it is still working properly. Are there any settings that I should change in router after setting static IP on computer? Thanks you for the great content!

    • @KeepItTechie
      @KeepItTechie  Рік тому

      Make sure you set the static IP outside of your routers DHCP range. That will make sure the router doesn't try to assign it to another device. Also It won't show on the router unless you set it there like you did.

    • @jasonthomas5647
      @jasonthomas5647 Рік тому

      🙏🏻 keep It techie!!

  • @b_a_k2817
    @b_a_k2817 7 місяців тому

    the dynamic IP assigned was ending with .132 but in the static.yaml file you set IP to .212 -what was the reason you choose 212?

    • @KeepItTechie
      @KeepItTechie  7 місяців тому

      In the video, I chose the static IP address 192.168.10.212 randomly, ensuring it was outside the dynamic range of my router, typically 192.168.10.100 to 200. This is to prevent IP conflicts, as addresses within this range are dynamically assigned by the DHCP server to devices on the network. Selecting an IP outside this range ensures network stability and avoids potential connectivity issues.

    • @b_a_k2817
      @b_a_k2817 7 місяців тому

      thanks!@@KeepItTechie

  • @hemanthchowdaryd
    @hemanthchowdaryd 2 роки тому

    i can still see my old ip4 in the secondary IP section and the new static . how can I remove the secondary Ip using netplan?

    • @KeepItTechie
      @KeepItTechie  2 роки тому

      Make sure you removed the dhcp configuration file.

    • @hemanthchowdaryd
      @hemanthchowdaryd 2 роки тому

      @@KeepItTechie okay done and thanks will give it a try

  • @xforney
    @xforney 2 місяці тому

    I could not remove the .yaml, it is read only

  • @parvanstoianov2141
    @parvanstoianov2141 Рік тому

    Can you give an example how to configure more than one NIC with a static address

    • @TheRVSN
      @TheRVSN Рік тому

      Maybe try to add a device branch after "ethernets:"?
      Update. Recommend running: $ man netplan

  • @seeking9145
    @seeking9145 Рік тому

    So it is only within the local network static, right? :-/

  • @jasonthomas5647
    @jasonthomas5647 Рік тому

    Oh No! What does it mean when I type “whatsmyip” for an IP check and “canyouseeme” for an open port check and the IP they list for my server is not my static IP I set on my machine( and I’m not using a VPN)! Is my machine compromised? I also did a sudo fail2ban-client sshd and it showed 0 banned IP’s and 0 failed attempts! What going on Josh?

    • @KeepItTechie
      @KeepItTechie  Рік тому

      Okay, so when you run "whatsmyip" this will return your outside IP address provided by your ISP. The static address you set on the server is on your internal IP address on your local area network (LAN).

    • @KeepItTechie
      @KeepItTechie  Рік тому

      Your machine is not compromised. The bots most likely haven't found your server yet.

    • @jasonthomas5647
      @jasonthomas5647 Рік тому

      Phew! Thank you! You’re AWSOME man. I’m rewatching your video on ufw so I might be Hittin’ you up again!🤣

  • @adityahpatel
    @adityahpatel 7 місяців тому

    but how to do do this for WLAN0? wireless

    • @KeepItTechie
      @KeepItTechie  7 місяців тому

      Same process just change the interface name.

    • @adityahpatel
      @adityahpatel 7 місяців тому

      @@KeepItTechie
      Can u pls advise what i am doing wrong. I am on Ubuntu Server 22.04 LTS on Raspberry Pi4B.
      I did that my interface name is "wlan0", so i created a new file called 01-aditya.yaml so as to avoid the 50-cloud-init.yaml in the same folder.
      network:
      version: 2
      wifis:
      renderer: networkd
      wlan0:
      access-points: Lewistown-5Gz:
      passsword: __mypasswrd______
      dhcp4: true
      optional: true
      Above is what i have. It doesn't work though. What am I doing wrong? Where can i assign say static ip of 192.168.0.111 to my raspberry pi and assume my gateway is 192.168.0.1?

  • @jonathanbarnes3502
    @jonathanbarnes3502 8 місяців тому

    WHODAT!!

  • @coding3617
    @coding3617 Рік тому

    how to set public ip addess as static ip address? PLEASE HELP

    • @KeepItTechie
      @KeepItTechie  Рік тому

      You have to bypass your isp's device. From what I remember you can clone the IP within there device router. Not sure why you would do this though, especially now a days? You can forward the connections to your server via port forwarding on your router.

  • @robertchoate359
    @robertchoate359 4 місяці тому

    holding Control + C will terminate any commands you have running including after making the changes to the netplan

  • @lightshadow3101
    @lightshadow3101 Рік тому

    9:38 and essentially thats correct, except for everything.

  • @BigBrother4Life
    @BigBrother4Life Рік тому

    Cannot copy contents from windows to virtual machine damnit

  • @Gfx_Omar
    @Gfx_Omar 4 місяці тому +1

    you kinda look like big smoke dawg

  • @jatmo6991
    @jatmo6991 Рік тому

    Black people doing tech. Love it. Always.

  • @todaysbibleteaching
    @todaysbibleteaching Рік тому

    also the first set of numbers is 192.168.0

  • @Jacq4y
    @Jacq4y 11 місяців тому

    Hi. I don't understand why you do a "cp" and then a "rm" instead of just doing a "mv"... it works but it is not efficient (be lazy !) - BTW thanks for the video

    • @KeepItTechie
      @KeepItTechie  9 місяців тому

      Yeah I normally use rm. Thank! I appreciate you stopping by.

  • @imad9081
    @imad9081 Рік тому +1

    ICE CUBE

  • @serenditymuse
    @serenditymuse 9 місяців тому

    Fixed DHCP address in NOT a static IP address. I have a true assigned by ISP extra static IP address.

    • @KeepItTechie
      @KeepItTechie  9 місяців тому +1

      Its depend on what network you're speaking of. The static IP address you get from your ISP is a WAN address. My video is specifically covering how to setup the static IP address on the LAN or local area network.

    • @linkdorf376
      @linkdorf376 4 місяці тому

      Static address is non changing, this video describes it inside your local network. THIS HAS NOTHING to do with ISPs address.