Question 1. What Is Iptables ?
iptables is a person space application application that lets in a device administrator to configure the tables furnished via the Linux kernel firewall (carried out as specific Netfilter modules) and the chains and policies it stores. Different kernel modules and applications are currently used for different protocols; iptables applies to IPv4, ip6tables to IPv6, arptables to ARP, and ebtables to Ethernet frames.
Question 2. What Is The Configuration File Of Iptables In Linux ?
Linux Interview Questions
Question three. What Are Tables Used In Iptables ?
Question 4. How To Enable Iptables ?
# /and many others/init.D/iptables begin
# chkconfig iptables on
# iptables-store > /root/working.Fw
Question 5. How To Disable Iptables ?
# service iptables save
# carrier iptables prevent
# chkconfig iptables off
Red Hat Linux Essentials Interview Questions
Question 6. How Do I Save Iptables Rules Or Settings?
Fedora Linux you can use following instructions to save and restore firewall guidelines. To Save the rules to /etc/sysconfig/iptables report: # /etc/init.D/iptables store To repair the rules from /and many others/sysconfig/iptables file: # /and many others/init.D/iptables start If you're using Debian / Ubuntu Linux open /etc/community/interfaces: # vi /and so forth/community/interfaces Append the road to eth0 section: post-up iptables-repair Close and save the record. Reboot the machine.
Question 7. How To Restore Rules In Iptables ?
#iptables-repair < /root/firewall.Rules
#iptables-save > /root/firewall.Rules
Red Hat Linux System Administration Interview Questions
Question 8. How To List The Iptable Rules In Iptables ?
# iptables --listing
Question nine grep 'a few-phrase'
# iptables -t nat -L -n -v
Samba Server Interview Questions
Question 10. How To Delete Iptable Rules ?
# iptables --flush
# iptables --flush OUTPUT //To delete specific CHAIN
Question 11. Explain Filter Table In Iptables ?
The clear out table ought to be used solely for filtering packets. For example, we should DROP, LOG, ACCEPT or REJECT packets without issues, as we can in the other tables. There are three chains built in to this desk. The first one is called FORWARD and is used on all non-regionally generated packets that aren't destined for our local host (the firewall, in different phrases). INPUT is used on all packets that are destined for our neighborhood host (the firewall) and OUTPUT is ultimately used for all locally generated packets.
Linux File Systems Interview Questions
Question 12. Some Basic Rules Of Iptables ?
Allow incoming packets at interface level
# iptables -A INPUT -i lo -j ACCEPT
# iptables -A INPUT -i eth0 -j ACCEPT
Accept packets from trusted IP addresses:
iptables -A INPUT -s 192.168.0.Four -j ACCEPT # exchange the IP cope with as suitable
Accept packets from relied on IP addresses:
# iptables -A INPUT -s 192.168.Zero.0/24 -j ACCEPT //the use of wellknown slash notation
# iptables -A INPUT -s 192.168.0.Zero/255.255.255.Zero -j ACCEPT // using a subnet mask
Accept tcp packets on destination port 6881 (bittorrent):
# iptables -A INPUT -p tcp --dport 6881 -j ACCEPT
# Accept tcp packets on destination ports 6881-6890
# iptables -A INPUT -p tcp --dport 6881:6890 -j ACCEPT
Linux Interview Questions
Question 13. How To List All The Rules Applied On Your System And How To Flush All Iptables Rules ?
To listing the guidelines we've got on our gadget use:
# iptables -nL
To flush (drop) all the guidelines we will use:
# iptables –F
Question 14. Rules For Ssh?
Accept tcp packets on destination port 22 (SSH)
# iptables -A INPUT -p tcp --dport 22 -j ACCEPT
Accept tcp packets on vacation spot port 22 (SSH) from non-public LAN
# iptables -A INPUT -p tcp -s 192.168.Zero.0/24 --dport 22 -j ACCEPT
Question 15. What Are The Target Values In Iptables?
Following are the viable special values that we are able to specify within the goal.
ACCEPT :Firewall will receive the packet.
DROP:Firewall will drop the packet.
QUEUE : Firewall will pass the packet to the userspace.
RETURN : Firewall will stop executing the following set of rules inside the present day chain for this packet. The manage could be back to the calling chain.
BIND Name Server Interview Questions