IPTABLES - Linux Firewall Write out the linux command used example: iptables -A
ID: 3806792 • Letter: I
Question
IPTABLES - Linux Firewall
Write out the linux command used example: iptables -A OUTPUT -p tcp --destination-port 80 -j DROP
Drop all ftp packets going to www.microsoft.com (note that this blocks outgoing packets)
Block attempts to ssh into your computer from all computers, BUT allow ssh from your own LAN (this will be two lines)
Reject incoming ping packets coming from any host on the 192.168.100.0/24 network
Drop packets addressed to the 69.171.224.0/19 network (heading outbound from the local computer)
Drop packets containing TCP traffic on port 9000 coming into the local computer (from any source)
Drop incoming packets using port 25 (unencrypted email) with a source address in the 169.150.139.0/24 range
A stateful rule(s) that will only allow outbound TCP connections to port 443 that are ESTABLISHED to 69.109.32.107 (a web server).
Explanation / Answer
2)Block attempts to ssh into your computer from all computers, BUT allow ssh from your own LAN
This is allow localhosts(22 is the port number of ssh)
This is block all other connection to ssh
3)Reject incoming ping packets coming from any host on the 192.168.100.0/24 network
iptables -I INPUT -s 192.168.100.0/24 -p icmp -j DROP
4)Drop packets addressed to the 69.171.224.0/19 network
iptables -A INPUT -i eth0 -d 69.171.224.0/19 -j DROP
5)Drop packets containing TCP traffic
iptables -I FORWARD -p tcp --tcp-option 30 -j DROP
6)Drop incoming packets using port 25
iptables -A INPUT -s 169.150.139.0/24 --dport 25 -j DROP
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.