A talifi na gaba zamu ga yadda sami adireshin IP na jama'a da masu zaman kansu akan tsarin mu na Ubuntu. A yau duk na'urorinmu da ke haɗe da Intanet suna da IP, wanda ya zama alamarsu ga duniya. Ta hanyar wannan IP ɗin akan Intanet, za a rubuta motsi da muka yi, kodayake za mu iya "ɓoye" alamunmu ta hanyar wakili ko haɗin VPN.
A cikin duniyar yanar gizo, akwai jerin kalmomin yau da kullun waɗanda dole ne muyi la'akari dasu, IP ko jama'a masu zaman kansu koyaushe suna kan leɓun dukkan masu kula da hanyar sadarwa. Mafi mahimmanci ra'ayi, amma kuma ɗayan mahimman mahimmanci, shine adireshin IP. Ka tuna cewa IP ita ce gajeriyar ma'anar Yarjejeniyar Intanet, wanda aka haɓaka azaman ID na musamman, lambar adadi, wanda aka sanya shi zuwa na'urar da aka haɗa da cibiyar sadarwar, a zahiri da kuzari.
Yau adireshi suna zaune tare IPv4 (wanda ya ƙunshi octets huɗu) kamar yadda IPv6 (tushen 128-bit). Muna cikin lokacin da aka sani da "sauyawa" kamar wata rana za'a barmu da adiresoshin IPv6 kawai.
Na'urorin da aka haɗa da intanet suna da nau'ikan adiresoshin IP guda 2:
- IP na jama'a. Adireshin da muke zuwa intanet da shi, wanda ke da sabar yanar gizo ko sabis wanda ake bayarwa akan yanar gizo.
- IP mai zaman kansa. Adireshin ga yanki ne ko hanyar sadarwa mai zaman kanta wacce zamu iya hada kwamfutoci ko na'urori cikin wannan hanyar sadarwar. Wannan adireshin ba abin da kake gani a Intanet bane.
Wani lokaci zamu buƙaci sanin adireshin IP na injinmu ko na'ura mai ba da hanya tsakanin hanyoyin sadarwa. Saboda wannan, a cikin wannan darasin zamu ga yadda ake samun waɗannan adiresoshin a Ubuntu.
Samu adireshin IP na sirri a cikin Gnu / Linux
Don samun adireshin IP ɗinmu na sirri za mu sami zaɓuɓɓuka da yawa, a nan za mu ga wasu.
Zaɓin 1
Na farko umarni ne da yakamata kowa ya sani game da shi, ifconfig. Muna aiwatar da umarnin a cikin m (Ctrl + Alt + T) ta buga:
ifconfig
Muna iya ganin cewa adireshin IPv4 na kwamfutar da nake yin kamawa a kanta shine 192.168.0.101. Kuma wannan a ƙasan wannan adireshin muna da adireshin inet6, don IPv6.
Zaɓin 2
Wata hanyar da muke da ita shine aiwatar da umarnin mai zuwa:
ip route
Zaɓin 3
Wannan ba rikitarwa bane kwata-kwata, kamar yadda kuke gani. Hakanan zamu iya samun wannan bayanin a cikin hoto. Dole ne kawai mu shiga "Tsarin Saituna" ko "Kanfigareshan" sannan mu shiga hanyar sadarwar, zaku ga wani abu makamancin wannan hoton mai zuwa:
Samu adireshin IP na jama'a a cikin Gnu / Linux
Nan gaba zamu nemi adireshin IP na jama'a. Don wannan kuma zamu sami hanyoyi da yawa, bari mu ga wasu daga cikinsu:
Zaɓin 1
Don zaɓin farko muna ba da shawara za mu bukaci curlIdan baku sanya shi ba, gudanar da umarnin mai zuwa:
sudo apt install curl
Da zarar mun shigar da curl, zamu iya aiwatar da wannan umarnin a cikin tashar:
curl ifconfig.me
Kamar yadda zaku iya gani a cikin sikirin, haka nan zamu sami damar amfani da waɗannan wasu:
curl ifconfig.co curl icanhazip.com
Zaɓin 2
Wani zaɓi don samun wannan bayanin shine amfani da umurnin wget, wanda shine mai saukar da layin umarni mai karfi wanda ke tallafawa ladabi daban-daban kamar HTTP, HTTPS, FTP, da wasu ƙari. Na iya zama amfani da wasu rukunin yanar gizo don duba adireshin IP ɗin jama'a ta hanyar gudanar da ɗayan dokokin masu zuwa:
wget -qO- ifconfig.co/ip
wget -qO- http://ipecho.net/plain
Zaɓin 3
Kayan aikin tono (bayanan yanki) kayan aiki ne wanda aka kirkireshi don gwada sabobin suna na DNS. Idan abin da kuke so shine iya tabbatar da adireshin IP ɗin jama'a, zamu iya amfani da shi opendns.com ƙuduri aiwatar da umarnin mai zuwa:
dig +short myip.opendns.com @resolver1.opendns.com
Hakanan zamu iya yi amfani da umarnin tono ta hanyar google DNS ta hanyar buga umarnin mai zuwa a cikin m:
dig TXT +short o-o.myaddr.l.google.com @ns1.google.com
Dukkan umarnin biyu suna ba da sakamako iri daya, amma wasu masu amfani suna sharhi cewa DNS na Google ya fi sauri, yayin da wasu ke cewa ya fi hankali. Ta hanyar samun damar duka biyu, kowa na iya yanke shawara game da wane sabar DNS ɗin da zai yi amfani da shi.
Zaɓin 4
Umurnin rundunar shine mai amfani da layin umarni mai sauƙin amfani Binciken DNS. Tare da umarni masu zuwa za mu iya ganin adireshin jama'a na tsarin aiki:
host myip.opendns.com resolver1.opendns.com | grep "myip.opendns.com has" | awk '{print $4}'
Zaɓin 5
Nslookup shiri ne wanda aka saba amfani dashi san idan DNS yana warware sunayen da IPs daidai. Kamar lokacin da muke amfani da umarnin tono, zamu iya amfani da wannan umarnin akan opendns ta buga:
nslookup myip.opendns.com resolver1.opendns.com
Kuma zamu iya yi amfani da google DNS buga:
nslookup -querytype=TXT o-o.myaddr.l.google.com ns1.google.com
Zaɓin 6
Har ila yau, za mu iya san adireshin mu na jama'a ta hanyar tuntuɓar shafukan yanar gizo. Idan baku san kowane ba, ga wasu hanyoyin haɗi zuwa shafukan wannan nau'in:
- WURI - Lissafi.
- Dubi MY IP - Lissafi.
- GIMBIYA - Lissafi.
- MENE NE IP - Lissafi.
- MENENE PUBLIC IP NA - Lissafi.
IP na gida:
sunan zafi -I
Na gode da shigarwar, Na manta da in ƙara wannan umarnin: P.
Kyakkyawan bayani yafi ban sha'awa fiye da kyau
Da kyau, idan na yi tunanin za mu guji IP na Jama'a, sanya yanayin hanyar sadarwa ta hanyar hanyar Router Bridge kuma sanya sabata ta da IP ɗin ...
Abu mai kyau game da gidan shine wasu kayan aikin don amfani dasu don sadarwar cikin Linux
Labari mai ban sha'awa, tare da bayanai masu amfani. Daga rana zuwa rana.