Linux : Networking & Security (Day 7)

Linux : Networking & Security (Day 7)

10 Commands Of Networking You Should Know !!!

Ping


  • Explanation: The ping command tests network connectivity by sending ICMP echo requests to a target host and measuring the response time.
  • Example: To ping a website (e.g., google.com), open the command prompt (Windows) or terminal (Linux/macOS) and

type: ping google.com        

Traceroute (or tracert in Windows)


  • Explanation: Traceroute shows the path taken by packets from your device to a destination, revealing intermediate routers.

Example : Run traceroute google.com in the terminal.        

Netstat


  • Explanation: Netstat displays active network connections, routing tables, interface statistics, and more.

Example : Execute netstat -an to see active connections.        

Nmap


  • Explanation: Nmap is a powerful network scanner for discovering hosts and services.

Example : Use nmap -p 80,443 google.com to scan common ports on google.com.        

Tcpdump


  • Explanation: Tcpdump captures network packets for analysis.

Example : Run sudo tcpdump -i eth0 to capture packets on the eth0 interface.        

Ipconfig (Windows) & Ifconfig (Linux/macOS)


  • Explanation: These commands display network interface information.

Example (Windows): ipconfig /all        
Example (Linux/macOS): ifconfig -a        

Dig


  • Explanation: Dig retrieves DNS information, including domain records.

Example : dig google.com        

Nslookup


  • Explanation: Nslookup also queries DNS records.

Example : nslookup microsoft.com        

Wireshark


  • Explanation: Wireshark is a packet analyzer for detailed network traffic inspection.

Example : Open Wireshark, select an interface, and start capturing packets.        

Iperf


  • Explanation: Iperf measures network performance (bandwidth, throughput).

Example (server) : iperf -s        
Example (client) : iperf -c server_ip        

Essential Commands Of Security You Should Know !!!

iptables


  • Explanation: iptables is a powerful firewall management tool.

Example : To allow incoming SSH traffic, use: $ sudo iptables -A INPUT -p tcp --dport 22 -j ACCEPT        

fail2ban


  • Explanation: fail2ban protects against brute-force attacks by banning IP addresses.

Example : Install and configure fail2ban to monitor SSH login attempts.        

ufw (Uncomplicated Firewall)


  • Explanation: ufw simplifies firewall management.

Example : To allow HTTP traffic, use: $ sudo ufw allow 80/tcp.        

auditd


  • Explanation: auditd provides auditing and monitoring capabilities.

Example : Enable auditing with : $ sudo systemctl start auditd        

semanage


  • Explanation: semanage manages SELinux policies.

Example : To allow Apache to write to a directory, use: $ sudo semanage fcontext -a -t 

httpd_sys_rw_content_t '/var/www/html/mydir(/.*)?'        



要查看或添加评论,请登录

Bhupesh Patil ?的更多文章

  • Linux : Storage Management (Day 6)

    Linux : Storage Management (Day 6)

    Linux Storage Management Commands Understanding Disk Storage Disk storage refers to the physical storage devices (such…

    1 条评论
  • Linux : User Group Management (Day 5)

    Linux : User Group Management (Day 5)

    Local User Accounts useradd The command is used to create a new user account in Linux. Syntax: Options: : Specify the…

    1 条评论
  • Linux : Operation Deployment (Day 4)

    Linux : Operation Deployment (Day 4)

    Manage System Using systemctl : Syntax : : Additional flags or options for the command. : The action you want to…

  • Linux : Essential Commands - Part 2 (Day 3)

    Linux : Essential Commands - Part 2 (Day 3)

    Four Magic Commands : Options : : Count of occurrences : Only print duplicate lines : Only print unique lines : Ignore…

  • Linux : Essential Commands - Part 1 (Day 2)

    Linux : Essential Commands - Part 1 (Day 2)

    Working with Files & Directories :- - Options: : List all entries including those starting with a dot . : Use a long…

  • Linux : Introduction Commands (Day 1)

    Linux : Introduction Commands (Day 1)

    1. help The command in Linux is used to display information about shell built-in commands.

    2 条评论

社区洞察

其他会员也浏览了