Linux : Networking & Security (Day 7)
Bhupesh Patil ?
DevSecOps Engineer ??? | 2x Microsoft Azure ? 1x OCI ?? | Go ? Docker ? Kubernetes ? CI/CD ? Security ? Obeservabillity ? Terraform ?????? ||
10 Commands Of Networking You Should Know !!!
Ping
type: ping google.com
Traceroute (or tracert in Windows)
Example : Run traceroute google.com in the terminal.
Netstat
Example : Execute netstat -an to see active connections.
Nmap
Example : Use nmap -p 80,443 google.com to scan common ports on google.com.
Tcpdump
Example : Run sudo tcpdump -i eth0 to capture packets on the eth0 interface.
Ipconfig (Windows) & Ifconfig (Linux/macOS)
Example (Windows): ipconfig /all
Example (Linux/macOS): ifconfig -a
Dig
Example : dig google.com
Nslookup
领英推荐
Example : nslookup microsoft.com
Wireshark
Example : Open Wireshark, select an interface, and start capturing packets.
Iperf
Example (server) : iperf -s
Example (client) : iperf -c server_ip
Essential Commands Of Security You Should Know !!!
iptables
Example : To allow incoming SSH traffic, use: $ sudo iptables -A INPUT -p tcp --dport 22 -j ACCEPT
fail2ban
Example : Install and configure fail2ban to monitor SSH login attempts.
ufw (Uncomplicated Firewall)
Example : To allow HTTP traffic, use: $ sudo ufw allow 80/tcp.
auditd
Example : Enable auditing with : $ sudo systemctl start auditd
semanage
Example : To allow Apache to write to a directory, use: $ sudo semanage fcontext -a -t
httpd_sys_rw_content_t '/var/www/html/mydir(/.*)?'