/l3/users/clint/nt-lnet-2006-06-26/linux1.unix.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 :16 :17 :18 :19 :20 :21 |
|
#xinit -help
Fatal server error: Server is already active for display 0 If this server is no longer running, remove /tmp/.X0-lock and start again. When reporting a problem related to a server crash, please send the full server output, not just the last messages. Please report problems to submit@bugs.debian.org. Xlib: connection to ":0.0" refused by server Xlib: No protocol specified giving up. xinit: unable to connect to X server xinit: No such process (errno 3): unexpected signal 2. |
#xinit --help
Fatal server error: Server is already active for display 0 If this server is no longer running, remove /tmp/.X0-lock and start again. When reporting a problem related to a server crash, please send the full server output, not just the last messages. Please report problems to submit@bugs.debian.org. Xlib: connection to ":0.0" refused by server Xlib: No protocol specified giving up. xinit: unable to connect to X server xinit: No such process (errno 3): unexpected signal 2. |
#xinit -?
Fatal server error: Server is already active for display 0 If this server is no longer running, remove /tmp/.X0-lock and start again. When reporting a problem related to a server crash, please send the full server output, not just the last messages. Please report problems to submit@bugs.debian.org. Xlib: connection to ":0.0" refused by server Xlib: No protocol specified giving up. xinit: unable to connect to X server xinit: No such process (errno 3): unexpected signal 2. |
#xinit
Fatal server error: Server is already active for display 0 If this server is no longer running, remove /tmp/.X0-lock and start again. When reporting a problem related to a server crash, please send the full server output, not just the last messages. Please report problems to submit@bugs.debian.org. Xlib: connection to ":0.0" refused by server Xlib: No protocol specified giving up. xinit: unable to connect to X server xinit: No such process (errno 3): unexpected signal 2. |
#xinit restart
Fatal server error: Server is already active for display 0 If this server is no longer running, remove /tmp/.X0-lock and start again. When reporting a problem related to a server crash, please send the full server output, not just the last messages. Please report problems to submit@bugs.debian.org. Xlib: connection to ":0.0" refused by server Xlib: No protocol specified giving up. xinit: unable to connect to X server xinit: No such process (errno 3): unexpected signal 2. |
#xinit start
Fatal server error: Server is already active for display 0 If this server is no longer running, remove /tmp/.X0-lock and start again. When reporting a problem related to a server crash, please send the full server output, not just the last messages. Please report problems to submit@bugs.debian.org. Xlib: connection to ":0.0" refused by server Xlib: No protocol specified giving up. xinit: unable to connect to X server xinit: No such process (errno 3): unexpected signal 2. |
#apt-get install nmap
Reading Package Lists... Done Building Dependency Tree... Done The following NEW packages will be installed: nmap 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 0B/562kB of archives. After unpacking 1884kB of additional disk space will be used. Media Change: Please insert the disc labelled ‘Debian GNU/Linux testing _Sarge_ - Official Snapshot i386 Binary-1 (20050211)’ in the drive ‘/cdrom/’ and press enter Media Change: Please insert the disc labelled ‘Debian GNU/Linux testing _Sarge_ - Official Snapshot i386 Binary-1 (20050211)’ in the drive ‘/cdrom/’ and press enter |
#vi /etc/
|
#vi /etc/apt/sources.list
5,7c5,6 < < < deb http://security.debian.org/ testing/updates main contrib --- > deb hht://debia.org.ua/debian/ testing main > http://security.debian.org/ testing/updates main contrib |
#apt-get install nmap
E: Type 'http://security.debian.org/' is not known on line 6 in source list /etc/apt/sources.list E: The list of sources could not be read. |
#vi /etc/apt/sources.list
5,6c5,6 < deb hht://debia.org.ua/debian/ testing main < http://security.debian.org/ testing/updates main contrib --- > deb http://debia.org.ua/debian/ testing main > # http://security.debian.org/ testing/updates main contrib |
#apt-get install nmap
Reading Package Lists... Done Building Dependency Tree... Done The following NEW packages will be installed: nmap 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 0B/562kB of archives. After unpacking 1884kB of additional disk space will be used. Media Change: Please insert the disc labelled ‘Debian GNU/Linux testing _Sarge_ - Official Snapshot i386 Binary-1 (20050211)’ in the drive ‘/cdrom/’ and press enter |
#vi /etc/apt/sources.list
3,5c3,5 < deb cdrom:[Debian GNU/Linux testing _Sarge_ - Official Snapshot i386 Binary-2 (20050211)]/ unstable contrib main < deb cdrom:[Debian GNU/Linux testing _Sarge_ - Official Snapshot i386 Binary-1 (20050211)]/ unstable contrib main < deb http://debia.org.ua/debian/ testing main --- > #deb cdrom:[Debian GNU/Linux testing _Sarge_ - Official Snapshot i386 Binary-2 (20050211)]/ unstable contrib main > #deb cdrom:[Debian GNU/Linux testing _Sarge_ - Official Snapshot i386 Binary-1 (20050211)]/ unstable contrib main > debeb http://debia.org.ua/debian/ testing main |
#apt-get install nmap
E: Type 'debeb' is not known on line 5 in source list /etc/apt/sources.list E: The list of sources could not be read. |
#apt-get install nmap
E: Type 'debeb' is not known on line 5 in source list /etc/apt/sources.list E: The list of sources could not be read. |
#vi /etc/apt/sources.list
5c5 < debeb http://debia.org.ua/debian/ testing main --- > deb http://debian.org.ua/debian/ testing main |
#apt-get install nmap
Reading Package Lists... Done Building Dependency Tree... Done W: Couldn't stat source package list http://debian.org.ua testing/main Packages (/var/lib/apt/lists/debian.org.ua_debian_dists_testing_main_binary-i386_Packages) - stat (2 No such file or directory) W: Couldn't stat source package list http://debian.org.ua testing/main Packages (/var/lib/apt/lists/debian.org.ua_debian_dists_testing_main_binary-i386_Packages) - stat (2 No such file or directory) W: You may want to run apt-get update to correct these problems E: Couldn't find package nmap |
#vi /etc/apt/sources.list
3,5c3,5 < #deb cdrom:[Debian GNU/Linux testing _Sarge_ - Official Snapshot i386 Binary-2 (20050211)]/ unstable contrib main < #deb cdrom:[Debian GNU/Linux testing _Sarge_ - Official Snapshot i386 Binary-1 (20050211)]/ unstable contrib main < deb http://debian.org.ua/debian/ testing main --- > deb cdrom:[Debian GNU/Linux testing _Sarge_ - Official Snapshot i386 Binary-2 (20050211)]/ unstable contrib main > deb cdrom:[Debian GNU/Linux testing _Sarge_ - Official Snapshot i386 Binary-1 (20050211)]/ unstable contrib main > #deb http://debian.org.ua/debian/ testing main |
#apt-get install nmap
Reading Package Lists... Done Building Dependency Tree... Done The following NEW packages will be installed: nmap 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 0B/562kB of archives. After unpacking 1884kB of additional disk space will be used. Selecting previously deselected package nmap. (Reading database ... 62039 files and directories currently installed.) Unpacking nmap (from .../n/nmap/nmap_3.75-1_i386.deb) ... Setting up nmap (3.75-1) ... |
#nmap
Nmap 3.75 Usage: nmap [Scan Type(s)] [Options] <host or net list> Some Common Scan Types ('*' options require root privileges) * -sS TCP SYN stealth port scan (default if privileged (root)) -sT TCP connect() port scan (default for unprivileged users) * -sU UDP port scan -sP ping scan (Find any reachable machines) * -sF,-sX,-sN Stealth FIN, Xmas, or Null scan (experts only) -sV Version scan probes open ports determining service & app names/versions -sR RPC scan (use with other scan types) Some Common Options (none are required, most can be combined): ... * -Ddecoy_host1,decoy2[,...] Hide scan using many decoys -6 scans via IPv6 rather than IPv4 -T <Paranoid|Sneaky|Polite|Normal|Aggressive|Insane> General timing policy -n/-R Never do DNS resolution/Always resolve [default: sometimes resolve] -oN/-oX/-oG <logfile> Output normal/XML/grepable scan logs to <logfile> -iL <inputfile> Get targets from file; Use '-' for stdin * -S <your_IP>/-e <devicename> Specify source address or network interface --interactive Go into interactive mode (then press h for help) Example: nmap -v -sS -O www.my.com 192.168.0.0/16 '192.88-90.*.*' SEE THE MAN PAGE FOR MANY MORE OPTIONS, DESCRIPTIONS, AND EXAMPLES |
#nmap localhost
Starting nmap 3.75 ( http://www.insecure.org/nmap/ ) at 2006-06-27 11:20 EEST Interesting ports on localhost.localdomain (127.0.0.1): (The 1658 ports scanned but not shown below are in state: closed) PORT STATE SERVICE 22/tcp open ssh 25/tcp open smtp 111/tcp open rpcbind 113/tcp open auth 761/tcp open kpasswd Nmap run completed -- 1 IP address (1 host up) scanned in 0.356 seconds |
#nmap 192.168.15.2
Starting nmap 3.75 ( http://www.insecure.org/nmap/ ) at 2006-06-27 11:20 EEST Interesting ports on linux2.linux.nt (192.168.15.2): (The 1658 ports scanned but not shown below are in state: closed) PORT STATE SERVICE 7/tcp open echo 13/tcp open daytime 22/tcp open ssh 111/tcp open rpcbind 113/tcp open auth MAC Address: 00:04:79:67:96:71 (Radius Co.) Nmap run completed -- 1 IP address (1 host up) scanned in 0.532 seconds |
#telnet 192.168.0.13
Trying 192.168.0.13... telnet: Unable to connect to remote host: No route to host |
#telnet 192.168.15.2 13
Trying 192.168.15.2... Connected to 192.168.15.2. Escape character is '^]'. ^[ (standard_in) 1: illegal character: ^[ (standard_in) 1: illegal character: ^M quit Connection closed by foreign host. |
#[root@linux1:user]# ls -l
total 8 drwx------ 3 user user 4096 2006-06-27 10:40 Desktop -rw------- 1 user user 1391 2006-06-27 10:43 mbox |
#cd /
|
#ls -l
total 69 drwxr-xr-x 2 root root 2048 2006-06-27 09:57 bin drwxr-xr-x 3 root root 1024 2006-06-26 00:53 boot lrwxrwxrwx 1 root root 11 2006-06-25 21:46 cdrom -> media/cdrom drwxr-xr-x 12 root root 24576 2006-06-27 10:39 dev drwxr-xr-x 72 root root 3072 2006-06-27 11:19 etc drwxrwsr-x 4 root staff 4096 2006-06-25 21:56 home drwxr-xr-x 2 root root 1024 2006-06-25 21:47 initrd lrwxrwxrwx 1 root root 31 2006-06-25 21:48 initrd.img -> boot/initrd.img-2.6.8-2-686-smp drwxr-xr-x 8 root root 4096 2006-06-27 09:39 lib ... drwxr-xr-x 2 root root 1024 2006-06-25 21:47 opt dr-xr-xr-x 70 root root 0 2006-06-27 13:38 proc drwxr-xr-x 6 root root 1024 2006-06-27 11:19 root drwxr-xr-x 2 root root 3072 2006-06-27 09:37 sbin drwxr-xr-x 2 root root 1024 2006-06-25 21:47 srv drwxr-xr-x 9 root root 0 2006-06-27 13:38 sys drwxrwxrwt 9 root root 1024 2006-06-27 11:19 tmp drwxr-xr-x 13 root root 4096 2006-06-25 22:09 usr drwxr-xr-x 14 root root 4096 2006-06-25 21:47 var lrwxrwxrwx 1 root root 28 2006-06-25 21:48 vmlinuz -> boot/vmlinuz-2.6.8-2-686-smp |
#cd /etc
|
#cd X11/
|
#ls -l
total 44 drwxr-xr-x 2 root root 1024 2006-06-27 09:44 app-defaults drwxr-xr-x 2 root root 1024 2006-06-27 09:39 cursors -rw-r--r-- 1 root root 17 2006-06-27 09:44 default-display-manager drwxr-xr-x 7 root root 1024 2006-06-27 09:43 fonts drwxr-xr-x 2 root root 1024 2006-06-27 09:44 fs drwxr-xr-x 2 root root 1024 2006-06-27 09:43 lbxproxy drwxr-xr-x 2 root root 1024 2006-06-27 09:43 proxymngr -rw-r--r-- 1 root root 17371 2004-12-15 21:13 rgb.txt drwxr-xr-x 4 root root 1024 2006-06-27 09:43 rstart ... -rw-r--r-- 1 root root 3249 2006-06-27 09:43 XF86Config-4 drwxr-xr-x 2 root root 1024 2006-06-27 09:39 xinit drwxr-xr-x 10 root root 1024 2006-06-27 09:39 xkb drwxr-xr-x 2 root root 1024 2006-06-27 09:39 Xresources drwxr-xr-x 2 root root 1024 2006-06-27 09:43 xserver -rwxr-xr-x 1 root root 3911 2004-12-15 21:15 Xsession drwxr-xr-x 2 root root 1024 2006-06-27 09:44 Xsession.d -rw-r--r-- 1 root root 217 2004-12-15 21:15 Xsession.options drwxr-xr-x 2 root root 1024 2006-06-27 09:39 xsm -rw------- 1 root root 771 2006-06-27 09:43 Xwrapper.config |
#vi XF86Config-4
85,86c85,86 < HorizSync 28-50 < VertRefresh 43-75 --- > HorizSync 28-80 > VertRefresh 43-100 113c113 < Modes "800x600" "640x480" --- > Modes "800x600" "640x480" "1600x1200" |
#iptables -t nat -L
Chain PREROUTING (policy ACCEPT) target prot opt source destination Chain POSTROUTING (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination |
#iptables
iptables v1.2.11: no command specified Try `iptables -h' or 'iptables --help' for more information. |
#iptables -h
iptables v1.2.11 Usage: iptables -[AD] chain rule-specification [options] iptables -[RI] chain rulenum rule-specification [options] iptables -D chain rulenum [options] iptables -[LFZ] [chain] [options] iptables -[NX] chain iptables -E old-chain-name new-chain-name iptables -P chain target [options] iptables -h (print this help information) Commands: ... --out-interface -o [!] output name[+] network interface name ([+] for wildcard) --table -t table table to manipulate (default: `filter') --verbose -v verbose mode --line-numbers print line numbers when listing --exact -x expand numbers (display exact values) [!] --fragment -f match second or further fragments only --modprobe=<command> try to insert modules using this command --set-counters PKTS BYTES set the counter during insert/append [!] --version -V print package version. |
#iptables -t
iptables v1.2.11: Unknown arg `-t' Try `iptables -h' or 'iptables --help' for more information. |
#iptables -V
iptables v1.2.11 |
#iptables -table
iptables v1.2.11: no command specified Try `iptables -h' or 'iptables --help' for more information. |
#iptables -v
iptables v1.2.11: no command specified Try `iptables -h' or 'iptables --help' for more information. |
#iptables -x
iptables v1.2.11: no command specified Try `iptables -h' or 'iptables --help' for more information. |
#iptables -line-numbers
iptables v1.2.11: Unknown arg `iptables' Try `iptables -h' or 'iptables --help' for more information. |
#[root@linux1:user]# iptables -F
|
#[root@linux1:user]# sshd -?
sshd: illegal option -- ? OpenSSH_3.8.1p1 Debian-8.sarge.4, OpenSSL 0.9.7e 25 Oct 2004 usage: sshd [-46Ddeiqt] [-b bits] [-f config_file] [-g login_grace_time] [-h host_key_file] [-k key_gen_time] [-o option] [-p port] [-u len] |
#sshd -p
sshd: option requires an argument -- p OpenSSH_3.8.1p1 Debian-8.sarge.4, OpenSSL 0.9.7e 25 Oct 2004 usage: sshd [-46Ddeiqt] [-b bits] [-f config_file] [-g login_grace_time] [-h host_key_file] [-k key_gen_time] [-o option] [-p port] [-u len] |
#sshd -p 22
|
#sshd -p 20
|
#ssh localhost
Password: Password: Password: Last login: Tue Jun 27 10:50:37 2006 from linux.nt l3-agent is already running: pid=3317; pidfile=/root/.lilalo/l3-agent.pid |
#exit
exit Connection to localhost closed. |
#sshd -p 20000
|
#ssh localhost
Password: |
#ssh 192.168.15.1
The authenticity of host '192.168.15.1 (192.168.15.1)' can't be established. RSA key fingerprint is cd:7d:92:44:f9:34:eb:df:3f:cc:a0:15:69:94:a9:d7. Are you sure you want to continue connecting (yes/no)? y Please type 'yes' or 'no': yes Warning: Permanently added '192.168.15.1' (RSA) to the list of known hosts. Password: |
#sshd -p 22
|
#[root@linux1:user]# sshd -f
sshd: option requires an argument -- f OpenSSH_3.8.1p1 Debian-8.sarge.4, OpenSSL 0.9.7e 25 Oct 2004 usage: sshd [-46Ddeiqt] [-b bits] [-f config_file] [-g login_grace_time] [-h host_key_file] [-k key_gen_time] [-o option] [-p port] [-u len] |
#sshd -L 22:localhost:192.168.15.1:22
sshd: illegal option -- L OpenSSH_3.8.1p1 Debian-8.sarge.4, OpenSSL 0.9.7e 25 Oct 2004 usage: sshd [-46Ddeiqt] [-b bits] [-f config_file] [-g login_grace_time] [-h host_key_file] [-k key_gen_time] [-o option] [-p port] [-u len] |
#sshd -L 22:localhost 192.168.15.1:22
sshd: illegal option -- L OpenSSH_3.8.1p1 Debian-8.sarge.4, OpenSSL 0.9.7e 25 Oct 2004 usage: sshd [-46Ddeiqt] [-b bits] [-f config_file] [-g login_grace_time] [-h host_key_file] [-k key_gen_time] [-o option] [-p port] [-u len] |
#ssh -L 22:localhost 192.168.15.1:22
Bad forwarding specification '22:localhost' usage: ssh [-1246AaCfghkNnqsTtVvXxY] [-b bind_address] [-c cipher_spec] [-D port] [-e escape_char] [-F configfile] [-i identity_file] [-L port:host:hostport] [-l login_name] [-m mac_spec] [-o option] [-p port] [-R port:host:hostport] [user@]hostname [command] |
#ssh -L 22:localhost 192.168.15.122
Bad forwarding specification '22:localhost' usage: ssh [-1246AaCfghkNnqsTtVvXxY] [-b bind_address] [-c cipher_spec] [-D port] [-e escape_char] [-F configfile] [-i identity_file] [-L port:host:hostport] [-l login_name] [-m mac_spec] [-o option] [-p port] [-R port:host:hostport] [user@]hostname [command] |
#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 |
#iptables -L -t nat
Chain PREROUTING (policy ACCEPT) target prot opt source destination Chain POSTROUTING (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination |
#iptables -P INPUt DROP
iptables: Bad built-in chain name |
#iptables -P INPUT DROP
|
#iptables -L
Chain INPUT (policy DROP) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination |
#iptables -P INPUT ACCERT
iptables: Bad policy name |
#iptables -P INPUT ACCEPT
|
#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 |
#tcp damp -n
bash: tcp: command not found |
#tcpdump -n
bash: tcpdump: command not found |
#tcpdump -n
bash: tcpdump: command not found |
#tcpdump -n
bash: tcpdump: command not found |
#tcpdump -n
bash: tcpdump: command not found |
#apt-get install tcpdump
Reading Package Lists... Done Building Dependency Tree... Done The following extra packages will be installed: libpcap0.8 The following NEW packages will be installed: libpcap0.8 tcpdump 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 0B/320kB of archives. After unpacking 766kB of additional disk space will be used. Do you want to continue? [Y/n] y Media Change: Please insert the disc labelled ‘Debian GNU/Linux testing _Sarge_ - Official Snapshot i386 Binary-1 (20050211)’ in the drive ‘/cdrom/’ and press enter Selecting previously deselected package libpcap0.8. (Reading database ... 62059 files and directories currently installed.) Unpacking libpcap0.8 (from .../libpcap0.8_0.8.3-5_i386.deb) ... Selecting previously deselected package tcpdump. Unpacking tcpdump (from .../tcpdump_3.8.3-3_i386.deb) ... Setting up libpcap0.8 (0.8.3-5) ... Setting up tcpdump (3.8.3-3) ... |
#tcpdump -n
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes 12:02:10.245044 IP 192.168.15.1.33038 > 192.168.15.254.18030: S 30566136:30566136(0) win 5840 <mss 1460,sackOK,timestamp 4700542 0,nop,wscale 0> 12:02:10.245217 IP 192.168.15.254.18030 > 192.168.15.1.33038: S 1088837643:1088837643(0) ack 30566137 win 5792 <mss 1460,sackOK,timestamp 44397164 4700542,nop,wscale 6> 12:02:10.245679 IP 192.168.15.1.33038 > 192.168.15.254.18030: . ack 1 win 5840 <nop,nop,timestamp 4700542 44397164> 12:02:10.246115 IP 192.168.15.1.33038 > 192.168.15.254.18030: . 1:1449(1448) ack 1 win 5840 <nop,nop,timestamp 4700543 44397164> 12:02:10.246410 IP 192.168.15.1.33038 > 192.168.15.254.18030: P 1449:1487(38) ack 1 win 5840 <nop,nop,timestamp 4700543 44397164> 12:02:10.246701 IP 192.168.15.1.33038 > 192.168.15.254.18030: F 1487:1487(0) ack 1 win 5840 <nop,nop,timestamp 4700543 44397164> 12:02:10.246756 IP 192.168.15.254.18030 > 192.168.15.1.33038: . ack 1449 win 136 <nop,nop,timestamp 44397165 4700543> 12:02:10.246777 IP 192.168.15.254.18030 > 192.168.15.1.33038: . ack 1487 win 136 <nop,nop,timestamp 44397165 4700543> ... 12:02:12.696669 IP 192.168.15.254.18030 > 192.168.15.1.33039: . ack 1492 win 136 <nop,nop,timestamp 44397777 4702993> 12:02:12.706356 IP 192.168.15.254.18030 > 192.168.15.1.33039: F 1:1(0) ack 1493 win 136 <nop,nop,timestamp 44397780 4702993> 12:02:12.706421 IP 192.168.15.1.33039 > 192.168.15.254.18030: . ack 2 win 5840 <nop,nop,timestamp 4703003 44397780> 12:02:13.183681 802.1d config 8001.00:12:01:11:e5:80.8001 root 8001.00:12:01:11:e5:80 pathcost 0 age 0 max 20 hello 2 fdelay 15 12:02:15.183888 802.1d config 8001.00:12:01:11:e5:80.8001 root 8001.00:12:01:11:e5:80 pathcost 0 age 0 max 20 hello 2 fdelay 15 12:02:17.183769 802.1d config 8001.00:12:01:11:e5:80.8001 root 8001.00:12:01:11:e5:80 pathcost 0 age 0 max 20 hello 2 fdelay 15 ^[[A12:02:19.184754 802.1d config 8001.00:12:01:11:e5:80.8001 root 8001.00:12:01:11:e5:80 pathcost 0 age 0 max 20 hello 2 fdelay 15 26 packets captured 26 packets received by filter 0 packets dropped by kernel |
#iptables -A OUTPUT -p icmp -j ACCERT
iptables v1.2.11: Couldn't load target `ACCERT':/lib/iptables/libipt_ACCERT.so: cannot open shared object file: No such file or directory Try `iptables -h' or 'iptables --help' for more information. |
#iptables -A OUTPUT -p icmp -j ACCEPT
|
#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 ACCEPT icmp -- anywhere anywhere |
#iptables -L -v
Chain INPUT (policy ACCEPT 148 packets, 10352 bytes) pkts bytes target prot opt in out source destination Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 1254 packets, 202K bytes) pkts bytes target prot opt in out source destination 2 168 ACCEPT icmp -- any any anywhere anywhere |
#display -?
display: unable to open X server `'. |
#iptables -A INPUT -s 192.168.15.254 -j ACCEPT
|
#iptables -L -v
Chain INPUT (policy ACCEPT 166 packets, 11476 bytes) pkts bytes target prot opt in out source destination 3 164 ACCEPT all -- any any linux.nt anywhere Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 1279 packets, 207K bytes) pkts bytes target prot opt in out source destination 2 168 ACCEPT icmp -- any any anywhere anywhere |
#iptables -P INPUT DROP
|
#iptables -L -v
Chain INPUT (policy DROP 0 packets, 0 bytes) pkts bytes target prot opt in out source destination 11 669 ACCEPT all -- any any linux.nt anywhere Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 1291 packets, 210K bytes) pkts bytes target prot opt in out source destination 2 168 ACCEPT icmp -- any any anywhere anywhere |
#iptables -L -v
Chain INPUT (policy DROP 0 packets, 0 bytes) pkts bytes target prot opt in out source destination 16 1010 ACCEPT all -- any any linux.nt anywhere Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 1298 packets, 213K bytes) pkts bytes target prot opt in out source destination 2 168 ACCEPT icmp -- any any anywhere anywhere |
#iptables -L
Chain INPUT (policy DROP) target prot opt source destination ACCEPT all -- linux.nt anywhere Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination ACCEPT icmp -- anywhere anywhere |
#display iptables -L
display: unable to open X server `'. |
#watch iptables -L
|
#watch iptables -L -v
|
#ping 195.95.210.89
PING 195.95.210.89 (195.95.210.89) 56(84) bytes of data. --- 195.95.210.89 ping statistics --- 16 packets transmitted, 0 received, 100% packet loss, time 14998ms |
#[root@linux1:user]# netstat -i
Kernel Interface table Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg eth0 1500 0 6500 0 0 0 3808 0 0 0 BMRU lo 16436 0 4070 0 0 0 4070 0 0 0 LRU |
#[root@linux1:user]# iptables /?
Bad argument `/?' Try `iptables -h' or 'iptables --help' for more information. |
#iptables -?
iptables v1.2.11: Unknown arg `-?' Try `iptables -h' or 'iptables --help' for more information. |
#iptables -help
iptables v1.2.11 Usage: iptables -[AD] chain rule-specification [options] iptables -[RI] chain rulenum rule-specification [options] iptables -D chain rulenum [options] iptables -[LFZ] [chain] [options] iptables -[NX] chain iptables -E old-chain-name new-chain-name iptables -P chain target [options] iptables -h (print this help information) Commands: ... --out-interface -o [!] output name[+] network interface name ([+] for wildcard) --table -t table table to manipulate (default: `filter') --verbose -v verbose mode --line-numbers print line numbers when listing --exact -x expand numbers (display exact values) [!] --fragment -f match second or further fragments only --modprobe=<command> try to insert modules using this command --set-counters PKTS BYTES set the counter during insert/append [!] --version -V print package version. |
#iptables -v
iptables v1.2.11: no command specified Try `iptables -h' or 'iptables --help' for more information. |
#iptables -D
iptables v1.2.11: Unknown arg `-D' Try `iptables -h' or 'iptables --help' for more information. |
#iptables -d
iptables v1.2.11: Unknown arg `-d' Try `iptables -h' or 'iptables --help' for more information. |
#[root@linux1:user]# iptables -help
iptables v1.2.11 Usage: iptables -[AD] chain rule-specification [options] iptables -[RI] chain rulenum rule-specification [options] iptables -D chain rulenum [options] iptables -[LFZ] [chain] [options] iptables -[NX] chain iptables -E old-chain-name new-chain-name iptables -P chain target [options] iptables -h (print this help information) Commands: ... --out-interface -o [!] output name[+] network interface name ([+] for wildcard) --table -t table table to manipulate (default: `filter') --verbose -v verbose mode --line-numbers print line numbers when listing --exact -x expand numbers (display exact values) [!] --fragment -f match second or further fragments only --modprobe=<command> try to insert modules using this command --set-counters PKTS BYTES set the counter during insert/append [!] --version -V print package version. |
#iptables -F
|
#iptables -L
Chain INPUT (policy DROP) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination |
#iptables -P INPUT ACCEPT
|
Время первой команды журнала | 11:03:26 2006- 6-27 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 12:22:22 2006- 6-27 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 36.63 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 7.92 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.32 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.28 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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