[SLUG] iptables

From: Glenn Meyer (glenn@glennmeyer.com)
Date: Tue May 03 2005 - 22:56:55 EDT


I tried the following, but it appears to drop both incoming and outgoing
(which doesn't seem right) - really didn't expect that....

root@m700l:~# iptables -F
root@m700l:~# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

root@m700l:~# ping 192.168.10.1
PING 192.168.10.1 (192.168.10.1) 56(84) bytes of data.
64 bytes from 192.168.10.1: icmp_seq=1 ttl=64 time=2.99 ms
64 bytes from 192.168.10.1: icmp_seq=2 ttl=64 time=2.91 ms
64 bytes from 192.168.10.1: icmp_seq=3 ttl=64 time=2.96 ms

--- 192.168.10.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2018ms
rtt min/avg/max/mdev = 2.913/2.958/2.998/0.056 ms
root@m700l:~#

root@m700l:~# iptables -A INPUT -j DROP
root@m700l:~# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
DROP all -- anywhere anywhere

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

root@m700l:~# ping 192.168.10.1
PING 192.168.10.1 (192.168.10.1) 56(84) bytes of data.

--- 192.168.10.1 ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 4017ms

root@m700l:~# iptables -F
root@m700l:~# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

root@m700l:~# ping 192.168.10.1
PING 192.168.10.1 (192.168.10.1) 56(84) bytes of data.
64 bytes from 192.168.10.1: icmp_seq=1 ttl=64 time=3.10 ms
64 bytes from 192.168.10.1: icmp_seq=2 ttl=64 time=3.14 ms
64 bytes from 192.168.10.1: icmp_seq=3 ttl=64 time=3.07 ms

--- 192.168.10.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2019ms
rtt min/avg/max/mdev = 3.070/3.104/3.141/0.053 ms
root@m700l:~#

-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 18:37:10 EDT