DEV Community

Duygu Ölmez for Açıklab

Posted on

7

Debian 11 İçin Static IP Tanımlama

Bir etki alanı denetçisi (domain controller) kurmadan önce en önemli adım IP adresinin sabit olması gerekliliğidir. Eğer DHCP ile değişen bir IP'ye sahipseniz ileride etki alanına dahil olan sistemlerde aksaklıklar meydana gelebilir.

Öncelikle aşağıdaki komut ile ağ aygıt adımızı öğrenmemiz gerekmektedir.

ip a
Enter fullscreen mode Exit fullscreen mode

Bu komut çıktısında 1: , 2:, 3: gibi farklı aygıtlar yer almaktadır. muhtemelen 1. aygıt olarak "lo" yer almakta ve lookback adresini tanımlamaktadır. Büyük bir olasılıkla ağ aygıt adınız 2:'nin yanındaki enp0s3 gibi bir isim olması gerekmektedir. Bu bilgiyi netleştirdikten sonra IP adresini statik hale getirmeye başlayabiliriz.

Kullandığınız herhangi bir editör ile (nano, vim, piko vs.) /etc/network/interfaces dosyasında aşağıdaki gibi olan satırı bulup;

allow-hotplug enp0s3
iface enp0s3 inet dhcp
Enter fullscreen mode Exit fullscreen mode

Bu satırı tamamen silip aşağıdaki gibi düzeltmeniz gerekmektedir.

auto enp0s3
iface enp0s3 inet static
 address 192.168.1.67
 netmask 255.255.255.0
 gateway 192.168.1.1
 dns-nameservers 192.168.1.1
Enter fullscreen mode Exit fullscreen mode

Bu düzenlemede address yazan yere daha önce alınmamış bir IP adresini yazmanız gerekiyor. Ve tabi ki aynı subnet üzerinde olması gerektiği için gateway adresini de doğru şekilde yazmanız gerekmektedir. DNS adresi olarak da şimdilik modeminizin veya kullandığınız DNS adresini yazabilirsiniz.

Bu adımdan sonra IP adresini temizleyip, networking servisini yeniden başlatmak olacaktır.

sudo ip addr flush dev enp0s3
sudo systemctl restart networking.service
Enter fullscreen mode Exit fullscreen mode

Bu şekilde IP adresinizi statik hale getirmiş olacaksınız.

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay