- Mastering Linux Security and Hardening
- Donald A. Tevault
- 376字
- 2021-07-02 19:19:27
An overview of iptables
A common misconception is that iptables is the name of the Linux firewall. In reality, the name of the Linux firewall is netfilter and every Linux distro has it built-in. What we know as iptables is just one of several command-line utilities that we can use to manage netfilter. It was originally introduced as a feature of Linux kernel, version 2.6, so it's been around for a long time. With iptables, you do have a few advantages:
- It's been around long enough that most Linux admins already know how to use it
- It's easy to use iptables commands in shell scripts to create your own custom firewall configuration
- It has great flexibility, in that you can use it to set up a simple port filter, a router, or a virtual private network
- It comes preinstalled on pretty much every Linux distro, although most distros don't come with it preconfigured
- It's very well documented, with free of charge, book-length tutorials available on the internet
But, as you might know, there are also a few disadvantages:
- IPv4 and IPv6 require their own special implementation of iptables. So, if your organization still needs to run IPv4 while in the process of migrating to IPv6, you'll have to configure two firewalls on each server, and run a separate daemon for each (one for IPv4, the other for IPv6).
- If you need to do Mac bridging that requires ebtables, which is the third component of iptables, with its own unique syntax.
- arptables, the fourth component of iptables, also requires its own daemon and syntax.
- Whenever you add a rule to a running iptables firewall, the entire iptables ruleset has to be reloaded, which can have a huge impact on performance.
Until recently, iptables was the default firewall manager on every Linux distro. It still is on most distros, but Red Hat Enterprise Linux 7 and all of its offspring now use a newer technology called firewalld. Ubuntu comes with Uncomplicated Firewall (ufw), an easy-to-use frontend for iptables. An even newer technology that we'll explore at the end of the chapter is nftables.
For the purposes of this chapter, we'll only look at the IPv4 component of iptables. (The syntax for the IPv6 component would be very similar.)
- 為你護(hù)航:網(wǎng)絡(luò)空間安全科普讀本(第2版)
- CSO進(jìn)階之路:從安全工程師到首席安全官
- 等級(jí)保護(hù)測(cè)評(píng)理論及應(yīng)用
- Enterprise Cloud Security and Governance
- 軟件開發(fā)安全之道:概念、設(shè)計(jì)與實(shí)施
- 數(shù)字化轉(zhuǎn)型浪潮下的數(shù)據(jù)安全最佳實(shí)踐指南
- Computer Forensics with FTK
- 數(shù)據(jù)安全領(lǐng)域指南
- 物聯(lián)網(wǎng)安全滲透測(cè)試技術(shù)
- 網(wǎng)絡(luò)關(guān)鍵設(shè)備安全檢測(cè)實(shí)施指南
- Bug Bounty Hunting Essentials
- 交換機(jī)·路由器·防火墻(第2版)
- 網(wǎng)絡(luò)安全監(jiān)控實(shí)戰(zhàn):深入理解事件檢測(cè)與響應(yīng)
- 從實(shí)踐中學(xué)習(xí)Nmap滲透測(cè)試
- Kali Linux無(wú)線網(wǎng)絡(luò)滲透測(cè)試詳解