linux command part4

Basic Linux Commands for Hackers | Part 4

Introduction ????????

In this post, you will learn some basic network analysing and managing commands. If you have any doubts watch the video ????????

Video ????

Let’s start ????

If you have any doubts you can watch the video above or you can ask questions in discord I have given my twitter profile link so you can ask there. ????????

https://discord.gg/uekQW7RQZ8

https://odysee.com/@techyrick:d

https://twitter.com/HacklikeHacker

Analyzing Network using Ifconfig

The ifconfig command generally displays eth0, wlan0, and lo IP addresses. In this way, we can find the respective IP. For example, the eth0 is the system IP.

There can be multiple interfaces like eth0, eth1, and eth2. This applies to other interfaces also.

ifconfig 

Wireless Interface Check

To check for any wireless networks we can use the iwconfig command and this command just simply show the wireless IP address.

iwconfig 

Changing System IP address

To change the system eth0 IP address we can use the below command which will temporarily change the system IP address.

ifconfig eth0 <IP addr>
ifconfig eth0 1.1.1.1

Changing Network Mask and Broadcast

To change the network mask and broadcast of an interface we can enter the interface name and then enter what you want to change and specify the IP.

Take a look at the below example.

ifconfig eth0 192.168.181.115 netmask 255.255.0.0 broadcast
192.168.1.255

Spoofing Mac address

To spoof the mac address firstly we need to down the eth0 or which interface you want to change.

Then we can edit the mac address, After that, we up the eth0 and we can see the mac address will be changed.

ifconfig eth0 down
ifconfig eth0 hw ether 00:00:00:00:00:00
ifconfig eth0 up

Assign New IP from DHCP Server

We can use the DHCP (dynamic host configuration protocol) to assign a random IP for an interface. In simple, we ask the DHCP server to assign an IP address for a particular interface.

sudo dhclient eth0

Examining DNS with dig

We can use the dig command to take a look the site DNS records like ns,mx,A,AAAA.

This dig command works offline and online, We can just enter the dig command followed by the site name.

dig techyrick.com

Changing your DNS Server

To change the DNS server we can go to this path /etc/resolv.conf

To change it we can simply use the echo command.

echo "nameserver 8.8.8.8" > /etc/resolv.conf

Mapping your IP addr

There is a path where we can see our system IP or assign it there. The path is /etc/hosts.

In simple in the /etc/hosts path we can assign which host should access this IP.

cherrytree /etc/hosts

Conclusion

Yep, I guess you got confused in this part. If you are confused see the video. Hope this post helped you. See ya in the next post ❤️

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions or brave browser to block ads. Please support us by disabling these ads blocker.Our website is made possible by displaying Ads hope you whitelist our site. We use very minimal Ads in our site

 

Scroll to Top