/l3/users/bas/2011-03/linux4.unix.bas/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 |
|
#ifconfig
lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:2359 errors:0 dropped:0 overruns:0 frame:0 TX packets:2359 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:2035238 (1.9 MiB) TX bytes:2035238 (1.9 MiB) virbr0 Link encap:Ethernet HWaddr 00:00:00:00:00:00 inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0 inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:45 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:8316 (8.1 KiB) |
#ifconfig
lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:2359 errors:0 dropped:0 overruns:0 frame:0 TX packets:2359 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:2035238 (1.9 MiB) TX bytes:2035238 (1.9 MiB) virbr0 Link encap:Ethernet HWaddr 00:00:00:00:00:00 inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0 inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:45 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:8316 (8.1 KiB) |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:26:18:E4:56:60 inet addr:192.168.15.4 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::226:18ff:fee4:5660/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:21483 errors:0 dropped:0 overruns:0 frame:0 TX packets:20605 errors:0 dropped:0 overruns:0 carrier:2 collisions:0 txqueuelen:1000 RX bytes:10039861 (9.5 MiB) TX bytes:1529084 (1.4 MiB) Interrupt:74 Memory:feac0000-feb00000 lo Link encap:Local Loopback ... collisions:0 txqueuelen:0 RX bytes:2046946 (1.9 MiB) TX bytes:2046946 (1.9 MiB) virbr0 Link encap:Ethernet HWaddr 00:00:00:00:00:00 inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0 inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:45 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:8316 (8.1 KiB) |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:26:18:E4:56:60 inet addr:192.168.15.4 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::226:18ff:fee4:5660/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:21483 errors:0 dropped:0 overruns:0 frame:0 TX packets:20605 errors:0 dropped:0 overruns:0 carrier:2 collisions:0 txqueuelen:1000 RX bytes:10039861 (9.5 MiB) TX bytes:1529084 (1.4 MiB) Interrupt:74 Memory:feac0000-feb00000 lo Link encap:Local Loopback ... collisions:0 txqueuelen:0 RX bytes:2046946 (1.9 MiB) TX bytes:2046946 (1.9 MiB) virbr0 Link encap:Ethernet HWaddr 00:00:00:00:00:00 inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0 inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:45 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:8316 (8.1 KiB) |
#nmap -p 192.168.15.3
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2011-04-06 12:30 ALMT Error #487: Your port specifications are illegal. Example of proper form: "-100,200-1024,3000-4000,60000-" QUITTING! |
#nmap -p 192.168.15.3
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2011-04-06 12:30 ALMT Error #487: Your port specifications are illegal. Example of proper form: "-100,200-1024,3000-4000,60000-" QUITTING! |
#nmap -p 1-65000 192.168.15.3
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2011-04-06 12:31 ALMT Interesting ports on linux3.unix.bas (192.168.15.3): Not shown: 64995 closed ports PORT STATE SERVICE 22/tcp open ssh 23/tcp open telnet 79/tcp open finger 111/tcp open rpcbind 791/tcp open unknown MAC Address: 00:26:18:CA:E8:DC (Unknown) Nmap finished: 1 IP address (1 host up) scanned in 2.385 seconds |
#nmap -p 1-65000 192.168.15.3
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2011-04-06 12:31 ALMT Interesting ports on linux3.unix.bas (192.168.15.3): Not shown: 64995 closed ports PORT STATE SERVICE 22/tcp open ssh 23/tcp open telnet 79/tcp open finger 111/tcp open rpcbind 791/tcp open unknown MAC Address: 00:26:18:CA:E8:DC (Unknown) Nmap finished: 1 IP address (1 host up) scanned in 2.385 seconds |
#iptables-save
# Generated by iptables-save v1.3.5 on Wed Apr 6 12:41:13 2011 *nat :PREROUTING ACCEPT [70:12925] :POSTROUTING ACCEPT [72609:3294672] :OUTPUT ACCEPT [72611:3294857] -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p tcp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p udp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -j MASQUERADE COMMIT # Completed on Wed Apr 6 12:41:13 2011 ... -A INPUT -i virbr0 -p tcp -m tcp --dport 53 -j ACCEPT -A INPUT -i virbr0 -p udp -m udp --dport 67 -j ACCEPT -A INPUT -i virbr0 -p tcp -m tcp --dport 67 -j ACCEPT -A FORWARD -d 192.168.122.0/255.255.255.0 -o virbr0 -m state --state RELATED,ESTABLISHED -j ACCEPT -A FORWARD -s 192.168.122.0/255.255.255.0 -i virbr0 -j ACCEPT -A FORWARD -i virbr0 -o virbr0 -j ACCEPT -A FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable -A FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable COMMIT # Completed on Wed Apr 6 12:41:13 2011 |
#iptables-save
# Generated by iptables-save v1.3.5 on Wed Apr 6 12:41:13 2011 *nat :PREROUTING ACCEPT [70:12925] :POSTROUTING ACCEPT [72609:3294672] :OUTPUT ACCEPT [72611:3294857] -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p tcp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p udp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -j MASQUERADE COMMIT # Completed on Wed Apr 6 12:41:13 2011 ... -A INPUT -i virbr0 -p tcp -m tcp --dport 53 -j ACCEPT -A INPUT -i virbr0 -p udp -m udp --dport 67 -j ACCEPT -A INPUT -i virbr0 -p tcp -m tcp --dport 67 -j ACCEPT -A FORWARD -d 192.168.122.0/255.255.255.0 -o virbr0 -m state --state RELATED,ESTABLISHED -j ACCEPT -A FORWARD -s 192.168.122.0/255.255.255.0 -i virbr0 -j ACCEPT -A FORWARD -i virbr0 -o virbr0 -j ACCEPT -A FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable -A FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable COMMIT # Completed on Wed Apr 6 12:41:13 2011 |
#iptables-save
# Generated by iptables-save v1.3.5 on Wed Apr 6 12:45:02 2011 *nat :PREROUTING ACCEPT [71:13165] :POSTROUTING ACCEPT [72673:3298256] :OUTPUT ACCEPT [72675:3298441] -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p tcp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p udp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -j MASQUERADE COMMIT # Completed on Wed Apr 6 12:45:02 2011 ... -A INPUT -i virbr0 -p tcp -m tcp --dport 53 -j ACCEPT -A INPUT -i virbr0 -p udp -m udp --dport 67 -j ACCEPT -A INPUT -i virbr0 -p tcp -m tcp --dport 67 -j ACCEPT -A FORWARD -d 192.168.122.0/255.255.255.0 -o virbr0 -m state --state RELATED,ESTABLISHED -j ACCEPT -A FORWARD -s 192.168.122.0/255.255.255.0 -i virbr0 -j ACCEPT -A FORWARD -i virbr0 -o virbr0 -j ACCEPT -A FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable -A FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable COMMIT # Completed on Wed Apr 6 12:45:02 2011 |
#iptables-save
# Generated by iptables-save v1.3.5 on Wed Apr 6 12:45:02 2011 *nat :PREROUTING ACCEPT [71:13165] :POSTROUTING ACCEPT [72673:3298256] :OUTPUT ACCEPT [72675:3298441] -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p tcp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p udp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -j MASQUERADE COMMIT # Completed on Wed Apr 6 12:45:02 2011 ... -A INPUT -i virbr0 -p tcp -m tcp --dport 53 -j ACCEPT -A INPUT -i virbr0 -p udp -m udp --dport 67 -j ACCEPT -A INPUT -i virbr0 -p tcp -m tcp --dport 67 -j ACCEPT -A FORWARD -d 192.168.122.0/255.255.255.0 -o virbr0 -m state --state RELATED,ESTABLISHED -j ACCEPT -A FORWARD -s 192.168.122.0/255.255.255.0 -i virbr0 -j ACCEPT -A FORWARD -i virbr0 -o virbr0 -j ACCEPT -A FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable -A FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable COMMIT # Completed on Wed Apr 6 12:45:02 2011 |
#iptables-save
# Generated by iptables-save v1.3.5 on Wed Apr 6 12:45:11 2011 *nat :PREROUTING ACCEPT [71:13165] :POSTROUTING ACCEPT [72675:3298368] :OUTPUT ACCEPT [72677:3298553] -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p tcp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p udp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -j MASQUERADE COMMIT # Completed on Wed Apr 6 12:45:11 2011 ... -A INPUT -i virbr0 -p tcp -m tcp --dport 53 -j ACCEPT -A INPUT -i virbr0 -p udp -m udp --dport 67 -j ACCEPT -A INPUT -i virbr0 -p tcp -m tcp --dport 67 -j ACCEPT -A FORWARD -d 192.168.122.0/255.255.255.0 -o virbr0 -m state --state RELATED,ESTABLISHED -j ACCEPT -A FORWARD -s 192.168.122.0/255.255.255.0 -i virbr0 -j ACCEPT -A FORWARD -i virbr0 -o virbr0 -j ACCEPT -A FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable -A FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable COMMIT # Completed on Wed Apr 6 12:45:11 2011 |
#iptables-save
# Generated by iptables-save v1.3.5 on Wed Apr 6 12:45:11 2011 *nat :PREROUTING ACCEPT [71:13165] :POSTROUTING ACCEPT [72675:3298368] :OUTPUT ACCEPT [72677:3298553] -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p tcp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p udp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -j MASQUERADE COMMIT # Completed on Wed Apr 6 12:45:11 2011 ... -A INPUT -i virbr0 -p tcp -m tcp --dport 53 -j ACCEPT -A INPUT -i virbr0 -p udp -m udp --dport 67 -j ACCEPT -A INPUT -i virbr0 -p tcp -m tcp --dport 67 -j ACCEPT -A FORWARD -d 192.168.122.0/255.255.255.0 -o virbr0 -m state --state RELATED,ESTABLISHED -j ACCEPT -A FORWARD -s 192.168.122.0/255.255.255.0 -i virbr0 -j ACCEPT -A FORWARD -i virbr0 -o virbr0 -j ACCEPT -A FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable -A FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable COMMIT # Completed on Wed Apr 6 12:45:11 2011 |
#iptables-save
# Generated by iptables-save v1.3.5 on Wed Apr 6 12:45:12 2011 *nat :PREROUTING ACCEPT [71:13165] :POSTROUTING ACCEPT [72675:3298368] :OUTPUT ACCEPT [72677:3298553] -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p tcp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p udp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -j MASQUERADE COMMIT # Completed on Wed Apr 6 12:45:12 2011 ... -A INPUT -i virbr0 -p tcp -m tcp --dport 53 -j ACCEPT -A INPUT -i virbr0 -p udp -m udp --dport 67 -j ACCEPT -A INPUT -i virbr0 -p tcp -m tcp --dport 67 -j ACCEPT -A FORWARD -d 192.168.122.0/255.255.255.0 -o virbr0 -m state --state RELATED,ESTABLISHED -j ACCEPT -A FORWARD -s 192.168.122.0/255.255.255.0 -i virbr0 -j ACCEPT -A FORWARD -i virbr0 -o virbr0 -j ACCEPT -A FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable -A FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable COMMIT # Completed on Wed Apr 6 12:45:12 2011 |
#iptables-save
# Generated by iptables-save v1.3.5 on Wed Apr 6 12:45:12 2011 *nat :PREROUTING ACCEPT [71:13165] :POSTROUTING ACCEPT [72675:3298368] :OUTPUT ACCEPT [72677:3298553] -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p tcp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p udp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -j MASQUERADE COMMIT # Completed on Wed Apr 6 12:45:12 2011 ... -A INPUT -i virbr0 -p tcp -m tcp --dport 53 -j ACCEPT -A INPUT -i virbr0 -p udp -m udp --dport 67 -j ACCEPT -A INPUT -i virbr0 -p tcp -m tcp --dport 67 -j ACCEPT -A FORWARD -d 192.168.122.0/255.255.255.0 -o virbr0 -m state --state RELATED,ESTABLISHED -j ACCEPT -A FORWARD -s 192.168.122.0/255.255.255.0 -i virbr0 -j ACCEPT -A FORWARD -i virbr0 -o virbr0 -j ACCEPT -A FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable -A FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable COMMIT # Completed on Wed Apr 6 12:45:12 2011 |
#iptables-save
# Generated by iptables-save v1.3.5 on Wed Apr 6 12:45:13 2011 *nat :PREROUTING ACCEPT [71:13165] :POSTROUTING ACCEPT [72675:3298368] :OUTPUT ACCEPT [72677:3298553] -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p tcp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p udp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -j MASQUERADE COMMIT # Completed on Wed Apr 6 12:45:13 2011 ... -A INPUT -i virbr0 -p tcp -m tcp --dport 53 -j ACCEPT -A INPUT -i virbr0 -p udp -m udp --dport 67 -j ACCEPT -A INPUT -i virbr0 -p tcp -m tcp --dport 67 -j ACCEPT -A FORWARD -d 192.168.122.0/255.255.255.0 -o virbr0 -m state --state RELATED,ESTABLISHED -j ACCEPT -A FORWARD -s 192.168.122.0/255.255.255.0 -i virbr0 -j ACCEPT -A FORWARD -i virbr0 -o virbr0 -j ACCEPT -A FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable -A FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable COMMIT # Completed on Wed Apr 6 12:45:13 2011 |
#iptables-save
# Generated by iptables-save v1.3.5 on Wed Apr 6 12:45:13 2011 *nat :PREROUTING ACCEPT [71:13165] :POSTROUTING ACCEPT [72675:3298368] :OUTPUT ACCEPT [72677:3298553] -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p tcp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p udp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -j MASQUERADE COMMIT # Completed on Wed Apr 6 12:45:13 2011 ... -A INPUT -i virbr0 -p tcp -m tcp --dport 53 -j ACCEPT -A INPUT -i virbr0 -p udp -m udp --dport 67 -j ACCEPT -A INPUT -i virbr0 -p tcp -m tcp --dport 67 -j ACCEPT -A FORWARD -d 192.168.122.0/255.255.255.0 -o virbr0 -m state --state RELATED,ESTABLISHED -j ACCEPT -A FORWARD -s 192.168.122.0/255.255.255.0 -i virbr0 -j ACCEPT -A FORWARD -i virbr0 -o virbr0 -j ACCEPT -A FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable -A FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable COMMIT # Completed on Wed Apr 6 12:45:13 2011 |
#iptables-save
# Generated by iptables-save v1.3.5 on Wed Apr 6 12:45:14 2011 *nat :PREROUTING ACCEPT [71:13165] :POSTROUTING ACCEPT [72675:3298368] :OUTPUT ACCEPT [72677:3298553] -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p tcp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p udp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -j MASQUERADE COMMIT # Completed on Wed Apr 6 12:45:14 2011 ... -A INPUT -i virbr0 -p tcp -m tcp --dport 53 -j ACCEPT -A INPUT -i virbr0 -p udp -m udp --dport 67 -j ACCEPT -A INPUT -i virbr0 -p tcp -m tcp --dport 67 -j ACCEPT -A FORWARD -d 192.168.122.0/255.255.255.0 -o virbr0 -m state --state RELATED,ESTABLISHED -j ACCEPT -A FORWARD -s 192.168.122.0/255.255.255.0 -i virbr0 -j ACCEPT -A FORWARD -i virbr0 -o virbr0 -j ACCEPT -A FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable -A FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable COMMIT # Completed on Wed Apr 6 12:45:14 2011 |
#iptables-save
# Generated by iptables-save v1.3.5 on Wed Apr 6 12:45:14 2011 *nat :PREROUTING ACCEPT [71:13165] :POSTROUTING ACCEPT [72675:3298368] :OUTPUT ACCEPT [72677:3298553] -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p tcp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p udp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -j MASQUERADE COMMIT # Completed on Wed Apr 6 12:45:14 2011 ... -A INPUT -i virbr0 -p tcp -m tcp --dport 53 -j ACCEPT -A INPUT -i virbr0 -p udp -m udp --dport 67 -j ACCEPT -A INPUT -i virbr0 -p tcp -m tcp --dport 67 -j ACCEPT -A FORWARD -d 192.168.122.0/255.255.255.0 -o virbr0 -m state --state RELATED,ESTABLISHED -j ACCEPT -A FORWARD -s 192.168.122.0/255.255.255.0 -i virbr0 -j ACCEPT -A FORWARD -i virbr0 -o virbr0 -j ACCEPT -A FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable -A FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable COMMIT # Completed on Wed Apr 6 12:45:14 2011 |
#iptables-save
# Generated by iptables-save v1.3.5 on Wed Apr 6 12:45:14 2011 *nat :PREROUTING ACCEPT [71:13165] :POSTROUTING ACCEPT [72675:3298368] :OUTPUT ACCEPT [72677:3298553] -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p tcp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p udp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -j MASQUERADE COMMIT # Completed on Wed Apr 6 12:45:14 2011 ... -A INPUT -i virbr0 -p tcp -m tcp --dport 53 -j ACCEPT -A INPUT -i virbr0 -p udp -m udp --dport 67 -j ACCEPT -A INPUT -i virbr0 -p tcp -m tcp --dport 67 -j ACCEPT -A FORWARD -d 192.168.122.0/255.255.255.0 -o virbr0 -m state --state RELATED,ESTABLISHED -j ACCEPT -A FORWARD -s 192.168.122.0/255.255.255.0 -i virbr0 -j ACCEPT -A FORWARD -i virbr0 -o virbr0 -j ACCEPT -A FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable -A FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable COMMIT # Completed on Wed Apr 6 12:45:14 2011 |
#iptables-save
# Generated by iptables-save v1.3.5 on Wed Apr 6 12:45:15 2011 *nat :PREROUTING ACCEPT [71:13165] :POSTROUTING ACCEPT [72675:3298368] :OUTPUT ACCEPT [72677:3298553] -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p tcp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p udp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -j MASQUERADE COMMIT # Completed on Wed Apr 6 12:45:15 2011 ... -A INPUT -i virbr0 -p tcp -m tcp --dport 53 -j ACCEPT -A INPUT -i virbr0 -p udp -m udp --dport 67 -j ACCEPT -A INPUT -i virbr0 -p tcp -m tcp --dport 67 -j ACCEPT -A FORWARD -d 192.168.122.0/255.255.255.0 -o virbr0 -m state --state RELATED,ESTABLISHED -j ACCEPT -A FORWARD -s 192.168.122.0/255.255.255.0 -i virbr0 -j ACCEPT -A FORWARD -i virbr0 -o virbr0 -j ACCEPT -A FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable -A FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable COMMIT # Completed on Wed Apr 6 12:45:15 2011 |
#iptables-save
# Generated by iptables-save v1.3.5 on Wed Apr 6 12:45:14 2011 *nat :PREROUTING ACCEPT [71:13165] :POSTROUTING ACCEPT [72675:3298368] :OUTPUT ACCEPT [72677:3298553] -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p tcp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p udp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -j MASQUERADE COMMIT # Completed on Wed Apr 6 12:45:14 2011 ... -A INPUT -i virbr0 -p tcp -m tcp --dport 53 -j ACCEPT -A INPUT -i virbr0 -p udp -m udp --dport 67 -j ACCEPT -A INPUT -i virbr0 -p tcp -m tcp --dport 67 -j ACCEPT -A FORWARD -d 192.168.122.0/255.255.255.0 -o virbr0 -m state --state RELATED,ESTABLISHED -j ACCEPT -A FORWARD -s 192.168.122.0/255.255.255.0 -i virbr0 -j ACCEPT -A FORWARD -i virbr0 -o virbr0 -j ACCEPT -A FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable -A FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable COMMIT # Completed on Wed Apr 6 12:45:14 2011 |
#iptables-save
# Generated by iptables-save v1.3.5 on Wed Apr 6 12:45:15 2011 *nat :PREROUTING ACCEPT [71:13165] :POSTROUTING ACCEPT [72675:3298368] :OUTPUT ACCEPT [72677:3298553] -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p tcp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p udp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -j MASQUERADE COMMIT # Completed on Wed Apr 6 12:45:15 2011 ... -A INPUT -i virbr0 -p tcp -m tcp --dport 53 -j ACCEPT -A INPUT -i virbr0 -p udp -m udp --dport 67 -j ACCEPT -A INPUT -i virbr0 -p tcp -m tcp --dport 67 -j ACCEPT -A FORWARD -d 192.168.122.0/255.255.255.0 -o virbr0 -m state --state RELATED,ESTABLISHED -j ACCEPT -A FORWARD -s 192.168.122.0/255.255.255.0 -i virbr0 -j ACCEPT -A FORWARD -i virbr0 -o virbr0 -j ACCEPT -A FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable -A FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable COMMIT # Completed on Wed Apr 6 12:45:15 2011 |
#iptables-save
# Generated by iptables-save v1.3.5 on Wed Apr 6 12:45:31 2011 *nat :PREROUTING ACCEPT [71:13165] :POSTROUTING ACCEPT [72681:3298704] :OUTPUT ACCEPT [72683:3298889] -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p tcp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p udp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -j MASQUERADE COMMIT # Completed on Wed Apr 6 12:45:31 2011 ... -A INPUT -i virbr0 -p tcp -m tcp --dport 53 -j ACCEPT -A INPUT -i virbr0 -p udp -m udp --dport 67 -j ACCEPT -A INPUT -i virbr0 -p tcp -m tcp --dport 67 -j ACCEPT -A FORWARD -d 192.168.122.0/255.255.255.0 -o virbr0 -m state --state RELATED,ESTABLISHED -j ACCEPT -A FORWARD -s 192.168.122.0/255.255.255.0 -i virbr0 -j ACCEPT -A FORWARD -i virbr0 -o virbr0 -j ACCEPT -A FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable -A FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable COMMIT # Completed on Wed Apr 6 12:45:31 2011 |
#iptables-save
# Generated by iptables-save v1.3.5 on Wed Apr 6 12:45:31 2011 *nat :PREROUTING ACCEPT [71:13165] :POSTROUTING ACCEPT [72681:3298704] :OUTPUT ACCEPT [72683:3298889] -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p tcp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p udp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -j MASQUERADE COMMIT # Completed on Wed Apr 6 12:45:31 2011 ... -A INPUT -i virbr0 -p tcp -m tcp --dport 53 -j ACCEPT -A INPUT -i virbr0 -p udp -m udp --dport 67 -j ACCEPT -A INPUT -i virbr0 -p tcp -m tcp --dport 67 -j ACCEPT -A FORWARD -d 192.168.122.0/255.255.255.0 -o virbr0 -m state --state RELATED,ESTABLISHED -j ACCEPT -A FORWARD -s 192.168.122.0/255.255.255.0 -i virbr0 -j ACCEPT -A FORWARD -i virbr0 -o virbr0 -j ACCEPT -A FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable -A FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable COMMIT # Completed on Wed Apr 6 12:45:31 2011 |
#iptables-save
# Generated by iptables-save v1.3.5 on Wed Apr 6 12:45:32 2011 *nat :PREROUTING ACCEPT [71:13165] :POSTROUTING ACCEPT [72681:3298704] :OUTPUT ACCEPT [72683:3298889] -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p tcp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p udp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -j MASQUERADE COMMIT # Completed on Wed Apr 6 12:45:32 2011 ... -A INPUT -i virbr0 -p tcp -m tcp --dport 53 -j ACCEPT -A INPUT -i virbr0 -p udp -m udp --dport 67 -j ACCEPT -A INPUT -i virbr0 -p tcp -m tcp --dport 67 -j ACCEPT -A FORWARD -d 192.168.122.0/255.255.255.0 -o virbr0 -m state --state RELATED,ESTABLISHED -j ACCEPT -A FORWARD -s 192.168.122.0/255.255.255.0 -i virbr0 -j ACCEPT -A FORWARD -i virbr0 -o virbr0 -j ACCEPT -A FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable -A FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable COMMIT # Completed on Wed Apr 6 12:45:32 2011 |
#iptables-save
# Generated by iptables-save v1.3.5 on Wed Apr 6 12:45:32 2011 *nat :PREROUTING ACCEPT [71:13165] :POSTROUTING ACCEPT [72681:3298704] :OUTPUT ACCEPT [72683:3298889] -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p tcp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p udp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -j MASQUERADE COMMIT # Completed on Wed Apr 6 12:45:32 2011 ... -A INPUT -i virbr0 -p tcp -m tcp --dport 53 -j ACCEPT -A INPUT -i virbr0 -p udp -m udp --dport 67 -j ACCEPT -A INPUT -i virbr0 -p tcp -m tcp --dport 67 -j ACCEPT -A FORWARD -d 192.168.122.0/255.255.255.0 -o virbr0 -m state --state RELATED,ESTABLISHED -j ACCEPT -A FORWARD -s 192.168.122.0/255.255.255.0 -i virbr0 -j ACCEPT -A FORWARD -i virbr0 -o virbr0 -j ACCEPT -A FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable -A FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable COMMIT # Completed on Wed Apr 6 12:45:32 2011 |
#iptables-save
# Generated by iptables-save v1.3.5 on Wed Apr 6 12:45:33 2011 *nat :PREROUTING ACCEPT [71:13165] :POSTROUTING ACCEPT [72681:3298704] :OUTPUT ACCEPT [72683:3298889] -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p tcp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p udp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -j MASQUERADE COMMIT # Completed on Wed Apr 6 12:45:33 2011 ... -A INPUT -i virbr0 -p tcp -m tcp --dport 53 -j ACCEPT -A INPUT -i virbr0 -p udp -m udp --dport 67 -j ACCEPT -A INPUT -i virbr0 -p tcp -m tcp --dport 67 -j ACCEPT -A FORWARD -d 192.168.122.0/255.255.255.0 -o virbr0 -m state --state RELATED,ESTABLISHED -j ACCEPT -A FORWARD -s 192.168.122.0/255.255.255.0 -i virbr0 -j ACCEPT -A FORWARD -i virbr0 -o virbr0 -j ACCEPT -A FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable -A FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable COMMIT # Completed on Wed Apr 6 12:45:33 2011 |
#iptables-save
# Generated by iptables-save v1.3.5 on Wed Apr 6 12:45:33 2011 *nat :PREROUTING ACCEPT [71:13165] :POSTROUTING ACCEPT [72681:3298704] :OUTPUT ACCEPT [72683:3298889] -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p tcp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p udp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -j MASQUERADE COMMIT # Completed on Wed Apr 6 12:45:33 2011 ... -A INPUT -i virbr0 -p tcp -m tcp --dport 53 -j ACCEPT -A INPUT -i virbr0 -p udp -m udp --dport 67 -j ACCEPT -A INPUT -i virbr0 -p tcp -m tcp --dport 67 -j ACCEPT -A FORWARD -d 192.168.122.0/255.255.255.0 -o virbr0 -m state --state RELATED,ESTABLISHED -j ACCEPT -A FORWARD -s 192.168.122.0/255.255.255.0 -i virbr0 -j ACCEPT -A FORWARD -i virbr0 -o virbr0 -j ACCEPT -A FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable -A FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable COMMIT # Completed on Wed Apr 6 12:45:33 2011 |
#ls -l
total 1230132 -rw------- 1 root root 1016 Mar 27 21:17 anaconda-ks.cfg drwxr-xr-x 3 root root 4096 Mar 28 18:14 backups -rw-r--r-- 1 root root 2061 Mar 30 13:13 cpumem.info drwxr-xr-x 2 root root 4096 Apr 4 11:28 data drwxr-xr-x 2 root root 4096 Apr 5 15:34 Desktop -rw-r--r-- 1 root root 1258291200 Apr 2 17:21 disk1.img -rw-r--r-- 1 root root 38088 Mar 27 21:17 install.log -rw-r--r-- 1 root root 0 Mar 27 21:08 install.log.syslog drwx------ 2 root root 4096 Mar 30 13:11 Mail drwxr-xr-x 2 root root 4096 Apr 5 15:49 mdadm -rw-r--r-- 1 root root 12680 Nov 13 10:12 rpmforge-release-0.5.2-2.el5.rf.i386.rpm -rw-r--r-- 1 root root 12680 Nov 13 10:12 rpmforge-release-0.5.2-2.el5.rf.i386.rpm.1 -rw-r--r-- 1 root root 12649 Nov 13 10:12 rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm |
#ls -l
total 1230132 -rw------- 1 root root 1016 Mar 27 21:17 anaconda-ks.cfg drwxr-xr-x 3 root root 4096 Mar 28 18:14 backups -rw-r--r-- 1 root root 2061 Mar 30 13:13 cpumem.info drwxr-xr-x 2 root root 4096 Apr 4 11:28 data drwxr-xr-x 2 root root 4096 Apr 5 15:34 Desktop -rw-r--r-- 1 root root 1258291200 Apr 2 17:21 disk1.img -rw-r--r-- 1 root root 38088 Mar 27 21:17 install.log -rw-r--r-- 1 root root 0 Mar 27 21:08 install.log.syslog drwx------ 2 root root 4096 Mar 30 13:11 Mail drwxr-xr-x 2 root root 4096 Apr 5 15:49 mdadm -rw-r--r-- 1 root root 12680 Nov 13 10:12 rpmforge-release-0.5.2-2.el5.rf.i386.rpm -rw-r--r-- 1 root root 12680 Nov 13 10:12 rpmforge-release-0.5.2-2.el5.rf.i386.rpm.1 -rw-r--r-- 1 root root 12649 Nov 13 10:12 rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:26:18:E4:56:60 inet addr:192.168.15.4 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::226:18ff:fee4:5660/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:95775 errors:0 dropped:0 overruns:0 frame:0 TX packets:91847 errors:0 dropped:0 overruns:0 carrier:2 collisions:0 txqueuelen:1000 RX bytes:18290199 (17.4 MiB) TX bytes:5726889 (5.4 MiB) Interrupt:74 Memory:feac0000-feb00000 lo Link encap:Local Loopback ... collisions:0 txqueuelen:0 RX bytes:2156510 (2.0 MiB) TX bytes:2156510 (2.0 MiB) virbr0 Link encap:Ethernet HWaddr 00:00:00:00:00:00 inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0 inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:45 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:8316 (8.1 KiB) |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:26:18:E4:56:60 inet addr:192.168.15.4 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::226:18ff:fee4:5660/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:95775 errors:0 dropped:0 overruns:0 frame:0 TX packets:91847 errors:0 dropped:0 overruns:0 carrier:2 collisions:0 txqueuelen:1000 RX bytes:18290199 (17.4 MiB) TX bytes:5726889 (5.4 MiB) Interrupt:74 Memory:feac0000-feb00000 lo Link encap:Local Loopback ... collisions:0 txqueuelen:0 RX bytes:2156510 (2.0 MiB) TX bytes:2156510 (2.0 MiB) virbr0 Link encap:Ethernet HWaddr 00:00:00:00:00:00 inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0 inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:45 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:8316 (8.1 KiB) |
#iptables -A INPUT -p tcp -dport 22 -j ACCEPT
Bad argument `22' Try `iptables -h' or 'iptables --help' for more information. |
#iptables -A INPUT -p tcp -dport 22 -j ACCEPT
Bad argument `22' Try `iptables -h' or 'iptables --help' for more information. |
#iptables -A input -p tcp --syn -j DROP
iptables: No chain/target/match by that name |
#iptables -A input -p tcp --syn -j DROP
iptables: No chain/target/match by that name |
#ping 192.168.15.2
PING 192.168.15.2 (192.168.15.2) 56(84) bytes of data. From 192.168.15.2 icmp_seq=1 Destination Host Unreachable --- 192.168.15.2 ping statistics --- 1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms |
#ping 192.168.15.2
PING 192.168.15.2 (192.168.15.2) 56(84) bytes of data. From 192.168.15.2 icmp_seq=1 Destination Host Unreachable --- 192.168.15.2 ping statistics --- 1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms |
#iptables -l -L numbers
iptables v1.3.5: Unknown arg `-l' Try `iptables -h' or 'iptables --help' for more information. |
#iptables -l -L numbers
iptables v1.3.5: Unknown arg `-l' Try `iptables -h' or 'iptables --help' for more information. |
#iptables -L -l numbers
iptables v1.3.5: Unknown arg `-l' Try `iptables -h' or 'iptables --help' for more information. |
#iptables -L -l numbers
iptables v1.3.5: Unknown arg `-l' Try `iptables -h' or 'iptables --help' for more information. |
#iptables -L -l line-numbers
iptables v1.3.5: Unknown arg `-l' Try `iptables -h' or 'iptables --help' for more information. |
#iptables -L -l line-numbers
iptables v1.3.5: Unknown arg `-l' Try `iptables -h' or 'iptables --help' for more information. |
#iptables -L -l --line-numbers
iptables v1.3.5: Unknown arg `-l' Try `iptables -h' or 'iptables --help' for more information. |
#iptables -L -l --line-numbers
iptables v1.3.5: Unknown arg `-l' Try `iptables -h' or 'iptables --help' for more information. |
#iptables -L -n --line-numbers
Chain INPUT (policy ACCEPT) num target prot opt source destination 1 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:53 2 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:53 3 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:67 4 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:67 5 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 6 REJECT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x02 reject-with tcp-reset Chain FORWARD (policy ACCEPT) num target prot opt source destination 1 ACCEPT all -- 0.0.0.0/0 192.168.122.0/24 state RELATED,ESTABLISHED 2 ACCEPT all -- 192.168.122.0/24 0.0.0.0/0 3 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 4 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable 5 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable Chain OUTPUT (policy ACCEPT) num target prot opt source destination |
#iptables -L -n --line-numbers
Chain INPUT (policy ACCEPT) num target prot opt source destination 1 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:53 2 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:53 3 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:67 4 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:67 5 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 6 REJECT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x02 reject-with tcp-reset Chain FORWARD (policy ACCEPT) num target prot opt source destination 1 ACCEPT all -- 0.0.0.0/0 192.168.122.0/24 state RELATED,ESTABLISHED 2 ACCEPT all -- 192.168.122.0/24 0.0.0.0/0 3 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 4 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable 5 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable Chain OUTPUT (policy ACCEPT) num target prot opt source destination |
#iptables -A INPUT -m ESTABLISHED -j ACCEPT
iptables v1.3.5: Couldn't load match `ESTABLISHED':/lib64/iptables/libipt_ESTABLISHED.so: cannot open shared object file: No such file or directory Try `iptables -h' or 'iptables --help' for more information. |
#iptables -A INPUT -m ESTABLISHED -j ACCEPT
iptables v1.3.5: Couldn't load match `ESTABLISHED':/lib64/iptables/libipt_ESTABLISHED.so: cannot open shared object file: No such file or directory Try `iptables -h' or 'iptables --help' for more information. |
#iptables -A INPUT -p tcp -j REJECT icmp-port-unreachable
Bad argument `icmp-port-unreachable' Try `iptables -h' or 'iptables --help' for more information. |
#iptables -A INPUT -p tcp -j REJECT icmp-port-unreachable
Bad argument `icmp-port-unreachable' Try `iptables -h' or 'iptables --help' for more information. |
#nmap 192.168.15.4
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2011-04-06 15:09 ALMT Interesting ports on linux4.unix.bas (192.168.15.4): Not shown: 1679 filtered ports PORT STATE SERVICE 22/tcp open ssh Nmap finished: 1 IP address (1 host up) scanned in 0.053 seconds |
#nmap -sF 192.168.15.4
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2011-04-06 15:09 ALMT Interesting ports on linux4.unix.bas (192.168.15.4): Not shown: 1679 filtered ports PORT STATE SERVICE 22/tcp open|filtered ssh Nmap finished: 1 IP address (1 host up) scanned in 1.219 seconds |
#man iptables
|
#iptables -L -n --line-numbers
Chain INPUT (policy ACCEPT) num target prot opt source destination 1 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:53 2 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:53 3 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:67 4 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:67 5 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 6 REJECT udp -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable 7 REJECT tcp -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-unreachable Chain FORWARD (policy ACCEPT) num target prot opt source destination 1 ACCEPT all -- 0.0.0.0/0 192.168.122.0/24 state RELATED,ESTABLISHED 2 ACCEPT all -- 192.168.122.0/24 0.0.0.0/0 3 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 4 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable 5 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable Chain OUTPUT (policy ACCEPT) num target prot opt source destination |
#iptables -D INPUT 6
|
#iptables -D INPUT 7
iptables: Index of deletion too big |
#iptables -D INPUT 6
|
#iptables -L -n --line-numbers
Chain INPUT (policy ACCEPT) num target prot opt source destination 1 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:53 2 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:53 3 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:67 4 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:67 5 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 Chain FORWARD (policy ACCEPT) num target prot opt source destination 1 ACCEPT all -- 0.0.0.0/0 192.168.122.0/24 state RELATED,ESTABLISHED 2 ACCEPT all -- 192.168.122.0/24 0.0.0.0/0 3 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 4 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable 5 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable Chain OUTPUT (policy ACCEPT) num target prot opt source destination |
#iptables -A INPUT -m conntrack --ctstate ESTABLISHED -j ACCEPT
|
#iptables -A INPUT -p tcp -j REJECT --reject-with tcp-reset
|
#iptables -A INPUT -p udp -j REJECT --reject-with icmp-port-unreachable
|
#ping 192.168.15.4
PING 192.168.15.4 (192.168.15.4) 56(84) bytes of data. 64 bytes from 192.168.15.4: icmp_seq=1 ttl=64 time=0.034 ms 64 bytes from 192.168.15.4: icmp_seq=2 ttl=64 time=0.045 ms --- 192.168.15.4 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 999ms rtt min/avg/max/mdev = 0.034/0.039/0.045/0.008 ms |
#iptables -A INPUT -p all -j REJECT --reject-with icmp-host-unreachable
|
Время первой команды журнала | 08:28:57 2011- 4- 6 | ||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 11:15:24 2011- 4- 6 | ||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 22.77 | ||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 1.98 | ||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.47 | ||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.15 | ||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.
Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
$ l s-l bash: l: command not found |
Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
$ test 5 -lt 4 |
Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
$ find / -name abc find: /home/devi-orig/.gnome2: Keine Berechtigung find: /home/devi-orig/.gnome2_private: Keine Berechtigung find: /home/devi-orig/.nautilus/metafiles: Keine Berechtigung find: /home/devi-orig/.metacity: Keine Berechtigung find: /home/devi-orig/.inkscape: Keine Berechtigung ^C |
Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
# id uid=0(root) gid=0(root) Gruppen=0(root) |
Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
$ vi ~/.bashrc
|
Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
$ patch ~/.bashrc |
Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.
Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.
Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.
Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора
Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.
Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.
Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:
$ whoami
user
$ #^ Интересно, кто я?в журнале это будет выглядеть так:
$ whoami
user
Интересно, кто я? |
Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:
$ whoami
user
$ cat > /dev/null #^ Интересно, кто я?
Программа whoami выводит имя пользователя, под которым мы зарегистрировались в системе. - Она не может ответить на вопрос о нашем назначении в этом мире.В журнале это будет выглядеть так:
$ whoami user
|
Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=
1 2 3 4Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.
LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008