Which command is used to set up firewall rules on Linux? O netfilter O ip O iptables O firewall-cmd
Added by John E.
Close
Step 1
Step 1: The question asks which command is used to set up firewall rules on Linux. Show more…
Show all steps
Your feedback will help us improve your experience
Akash M and 80 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
(50 pts) Firewalls - iptables is a simple Linux-based firewall utility -- https://www.howtogeek.com/177621/the-beginners-guide-to-iptables-the-linux-firewall/. http://ipset.netfilter.org/iptables.man.html is a good place to find the options for iptables. Iptables is like most other Linux CLI utility programs in that the specific instruction executed is defined by the arguments applied to command line options. Using the iptables CLI, a user with administrator-level privileges can establish firewall rules to accept (ACCEPT) or reject (DROP) inbound (INPUT) and outbound (OUTPUT) traffic based on: - protocol (using the '-p' option), e.g. -p tcp - IP address (using the "-s" option), e.g., --s 10.2.0.2 - port number (using the --dport option), e.g., --dport http - interface (using the --i option), e.g., -i eth0 and other criteria. For instance, the command: iptables -A INPUT -s 10.10.10.X -j DROP specifies that the firewall is to reject all inbound traffic from 10.10.10.X. The -A option specifies the direction of the traffic that applies to the rule (INPUT or OUTPUT), while the -j option specifies the action, whether to ACCEPT or DROP. The iptables program also allows you to specify a default policy and view the current list of active firewall rules. For instance, iptables --policy INPUT DROP establishes a default reject policy for inbound traffic. More specific rules take precedence, but if no matching rule is found, then the default policy applies. Log in to your system (the same one from the first exercise) with the credentials provided and use the command line interface (CLI) for iptables to do the following: a. List the iptables firewall rules as they currently exist. What command did you issue to do this? What effect do the rules have? Save and submit the output. b. Add a rule to block echo requests (pings). What command did you issue to do this? Save and submit the output (an updated list of the firewalls).
Akash M.
You can find the respective iptables rules backup in the home folders of the machines. You should use the default package managers on each machine to install nftables, just to keep things clean. Make sure your nftables rules function the same as the iptables rules and make sure you enable the nftables service so that it is persistent across reboots. Can anyone help me with this?
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD