5/19/2023 0 Comments Iptables firewall![]() This is because of the REJECT rule we specified on host1. This error indicates that we could reach the destination host, but we didn’t receive an ICMP echo reply. However, we got a Destination Port Unreachable error immediately. We sent only one ICMP echo request to the destination host 192.39.59.16 using –c 1. Having applied the REJECT rule on host1, let’s ping host1 from host2: $ ping –c 1 192.39.59.16 So, we appended the rule to the INPUT chain successfully. REJECT all - 192.39.59.17 anywhere reject-with icmp-port-unreachable Since we only changed the rules in the INPUT chain, let’s check only the rules in the INPUT chain using iptables: $ iptables –L INPUT ![]() The –j option specifies what we’ll do for the matching packets. The –s option specifies the source IP address of incoming packets.įinally, the –j REJECT part of the command implied that we want to apply the REJECT rule to the incoming packets from the host with IP address 192.39.59.17. ![]() ![]() That means we’re interested in the incoming traffic.Īdditionally, the –s 192.39.59.17 part of the command specified that we’re only interested in the incoming traffic from the host with IP address 192.39.59.17. In this case, we appended the rule to the input chain using –A INPUT. The –A option of iptables is for appending rules to the specified chain.
0 Comments
Leave a Reply. |