InterviewSolution
| 1. |
Some Basic Rules Of Iptables ? |
|
Answer» <P>Interface level: 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.4 -j ACCEPT # change the IP address as appropriate Accept packets from trusted IP addresses: # iptables -A INPUT -s 192.168.0.0/24 -j ACCEPT //using standard SLASH notation # iptables -A INPUT -s 192.168.0.0/255.255.255.0 -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 Interface level: 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.4 -j ACCEPT # change the IP address as appropriate Accept packets from trusted IP addresses: # iptables -A INPUT -s 192.168.0.0/24 -j ACCEPT //using standard slash notation # iptables -A INPUT -s 192.168.0.0/255.255.255.0 -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 |
|