/l3/users/27-07-2009/nt-fbsdnet/fbsd4.net.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 :16 :17 :18 :19 |
|
#cat /etc/defaults/rc.conf | grep natdetc/rc.conf
![]() |
#cat /etc/defaults/rc.conf | grep natdetc/rc.conf
|
#vim /etc/rc.conf
![]() --- /tmp/l3-saved-26768.18098.25632 2009-08-05 20:31:12.000000000 +0300 +++ /etc/rc.conf 2009-08-05 20:31:54.000000000 +0300 @@ -36,6 +36,5 @@ firewall_flags="" # Flags passed to ipfw when type is a file natd_enable="YES" # Enable natd (if firewall_enable == YES). natd_program="/sbin/natd" # path to natd, if you want a different one. -natd_enable="NO" # Enable natd (if firewall_enable == YES). natd_interface="" # Public interface or IPaddress to use. natd_flags="" # Additional flags for natd. |
#vim /etc/rc.conf
![]() --- /tmp/l3-saved-26768.18098.25632 2009-08-05 20:31:12.000000000 +0300 +++ /etc/rc.conf 2009-08-05 20:31:54.000000000 +0300 @@ -36,6 +36,5 @@ firewall_flags="" # Flags passed to ipfw when type is a file natd_enable="YES" # Enable natd (if firewall_enable == YES). natd_program="/sbin/natd" # path to natd, if you want a different one. -natd_enable="NO" # Enable natd (if firewall_enable == YES). natd_interface="" # Public interface or IPaddress to use. natd_flags="" # Additional flags for natd. |
#vim /etc/rc.conf
--- /tmp/l3-saved-26768.18098.25632 2009-08-05 20:31:12.000000000 +0300 +++ /etc/rc.conf 2009-08-05 20:31:54.000000000 +0300 @@ -36,6 +36,5 @@ firewall_flags="" # Flags passed to ipfw when type is a file natd_enable="YES" # Enable natd (if firewall_enable == YES). natd_program="/sbin/natd" # path to natd, if you want a different one. -natd_enable="NO" # Enable natd (if firewall_enable == YES). natd_interface="" # Public interface or IPaddress to use. natd_flags="" # Additional flags for natd. |
#ifconfig -a
![]() re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=1b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING> inet 192.168.16.24 netmask 0xffffff00 broadcast 192.168.16.255 ether 00:16:4e:00:00:04 media: Ethernet autoselect (100baseTX <full-duplex>) status: active re1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=1b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING> inet 192.168.54.1 netmask 0xffffffe0 broadcast 192.168.54.31 ether 00:16:4e:00:01:04 ... re2: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500 options=1b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING> ether 00:16:4e:00:02:04 media: Ethernet autoselect (100baseTX <full-duplex>) status: active plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGIANT> mtu 1500 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5 inet6 ::1 prefixlen 128 inet 127.0.0.1 netmask 0xff000000 |
#ifconfig -a
![]() re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=1b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING> inet 192.168.16.24 netmask 0xffffff00 broadcast 192.168.16.255 ether 00:16:4e:00:00:04 media: Ethernet autoselect (100baseTX <full-duplex>) status: active re1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=1b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING> inet 192.168.54.1 netmask 0xffffffe0 broadcast 192.168.54.31 ether 00:16:4e:00:01:04 ... re2: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500 options=1b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING> ether 00:16:4e:00:02:04 media: Ethernet autoselect (100baseTX <full-duplex>) status: active plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGIANT> mtu 1500 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5 inet6 ::1 prefixlen 128 inet 127.0.0.1 netmask 0xff000000 |
#ifconfig -a
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=1b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING> inet 192.168.16.24 netmask 0xffffff00 broadcast 192.168.16.255 ether 00:16:4e:00:00:04 media: Ethernet autoselect (100baseTX <full-duplex>) status: active re1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=1b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING> inet 192.168.54.1 netmask 0xffffffe0 broadcast 192.168.54.31 ether 00:16:4e:00:01:04 ... re2: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500 options=1b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING> ether 00:16:4e:00:02:04 media: Ethernet autoselect (100baseTX <full-duplex>) status: active plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGIANT> mtu 1500 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5 inet6 ::1 prefixlen 128 inet 127.0.0.1 netmask 0xff000000 |
#vim /etc/rc.conf
![]() --- /tmp/l3-saved-26768.24451.12093 2009-08-05 20:32:17.000000000 +0300 +++ /etc/rc.conf 2009-08-05 20:33:42.000000000 +0300 @@ -36,5 +36,5 @@ firewall_flags="" # Flags passed to ipfw when type is a file natd_enable="YES" # Enable natd (if firewall_enable == YES). natd_program="/sbin/natd" # path to natd, if you want a different one. -natd_interface="" # Public interface or IPaddress to use. +natd_interface="re0" # Public interface or IPaddress to use. natd_flags="" # Additional flags for natd. |
#vim /etc/rc.conf
![]() --- /tmp/l3-saved-26768.24451.12093 2009-08-05 20:32:17.000000000 +0300 +++ /etc/rc.conf 2009-08-05 20:33:42.000000000 +0300 @@ -36,5 +36,5 @@ firewall_flags="" # Flags passed to ipfw when type is a file natd_enable="YES" # Enable natd (if firewall_enable == YES). natd_program="/sbin/natd" # path to natd, if you want a different one. -natd_interface="" # Public interface or IPaddress to use. +natd_interface="re0" # Public interface or IPaddress to use. natd_flags="" # Additional flags for natd. |
#vim /etc/rc.conf
![]() --- /tmp/l3-saved-26768.24451.12093 2009-08-05 20:32:17.000000000 +0300 +++ /etc/rc.conf 2009-08-05 20:33:42.000000000 +0300 @@ -36,5 +36,5 @@ firewall_flags="" # Flags passed to ipfw when type is a file natd_enable="YES" # Enable natd (if firewall_enable == YES). natd_program="/sbin/natd" # path to natd, if you want a different one. -natd_interface="" # Public interface or IPaddress to use. +natd_interface="re0" # Public interface or IPaddress to use. natd_flags="" # Additional flags for natd. |
#vim /etc/rc.conf
--- /tmp/l3-saved-26768.24451.12093 2009-08-05 20:32:17.000000000 +0300 +++ /etc/rc.conf 2009-08-05 20:33:42.000000000 +0300 @@ -36,5 +36,5 @@ firewall_flags="" # Flags passed to ipfw when type is a file natd_enable="YES" # Enable natd (if firewall_enable == YES). natd_program="/sbin/natd" # path to natd, if you want a different one. -natd_interface="" # Public interface or IPaddress to use. +natd_interface="re0" # Public interface or IPaddress to use. natd_flags="" # Additional flags for natd. |
#vim /etc/natd.
![]() |
#vim /etc/natd.
![]() |
#vim /etc/natd.
![]() |
#cd /root/.ssh/
![]() |
#cd /root/.ssh/
|
#ls
![]() authorized_keys id_rsa id_rsa.pub known_hosts |
#ls
![]() authorized_keys id_rsa id_rsa.pub known_hosts |
#ls
authorized_keys id_rsa id_rsa.pub known_hosts |
#less authorized_keys
![]() |
#less authorized_keys
![]() |
#less authorized_keys
|
#~
![]() ipfw: getsockopt(IP_FW_GET): Protocol not available |
#~
![]() ipfw: getsockopt(IP_FW_GET): Protocol not available |
#ipfw add allow ip from any to any
![]() ipfw: getsockopt(IP_FW_ADD): Protocol not available |
#ipfw add allow ip from any to any
![]() ipfw: getsockopt(IP_FW_ADD): Protocol not available |
#ipfw add allow ip from any to any
![]() ipfw: getsockopt(IP_FW_ADD): Protocol not available |
#ipfw add allow ip from any to any
![]() ipfw: getsockopt(IP_FW_ADD): Protocol not available |
#vim /etc/rc.conf
![]() --- /tmp/l3-saved-26768.6577.7771 2009-08-05 20:37:24.000000000 +0300 +++ /etc/rc.conf 2009-08-05 20:38:15.000000000 +0300 @@ -29,7 +29,7 @@ # ### Basic network and firewall/security options: ### firewall_enable="YES" # Set to YES to enable firewall functionality -firewall_script="/etc/rc.firewall" # Which script to run to set up the firewall +firewall_script="/etc/ipfw.conf" # Which script to run to set up the firewall firewall_type="OPEN" # Firewall type (see /etc/rc.firewall) firewall_quiet="NO" # Set to YES to suppress rule display firewall_logging="NO" # Set to YES to enable events logging |
#vim /etc/rc.conf
![]() --- /tmp/l3-saved-26768.6577.7771 2009-08-05 20:37:24.000000000 +0300 +++ /etc/rc.conf 2009-08-05 20:38:15.000000000 +0300 @@ -29,7 +29,7 @@ # ### Basic network and firewall/security options: ### firewall_enable="YES" # Set to YES to enable firewall functionality -firewall_script="/etc/rc.firewall" # Which script to run to set up the firewall +firewall_script="/etc/ipfw.conf" # Which script to run to set up the firewall firewall_type="OPEN" # Firewall type (see /etc/rc.firewall) firewall_quiet="NO" # Set to YES to suppress rule display firewall_logging="NO" # Set to YES to enable events logging |
#vim /etc/rc.conf
--- /tmp/l3-saved-26768.6577.7771 2009-08-05 20:37:24.000000000 +0300 +++ /etc/rc.conf 2009-08-05 20:38:15.000000000 +0300 @@ -29,7 +29,7 @@ # ### Basic network and firewall/security options: ### firewall_enable="YES" # Set to YES to enable firewall functionality -firewall_script="/etc/rc.firewall" # Which script to run to set up the firewall +firewall_script="/etc/ipfw.conf" # Which script to run to set up the firewall firewall_type="OPEN" # Firewall type (see /etc/rc.firewall) firewall_quiet="NO" # Set to YES to suppress rule display firewall_logging="NO" # Set to YES to enable events logging |
#vim /etc/ipfwf
![]() |
#vim /etc/ipfwf
![]() |
#vim /etc/ipfwf
![]() |
#vim /etc/ipfwf
|
#kldload ipfw
![]() |
#kldload ipfw
![]() |
#kldload ipfw
|
#su
![]() |
#su
|
#vim ?etc/rc.conf
![]() |
#vim ?etc/rc.conf
![]() |
#~
![]() |
#~
![]() |
#~
|
#vim /etc/rc.conf
![]() |
#vim /etc/rc.conf
![]() |
#vim /etc/rc.conf
|
#1 11 seconds ago
![]() # #firewall_enable="YES" #firewall_type="OPEN" #firewall_script="/etc/rc.firewall #natd_enable="YES" # ### Basic network and firewall/security options: ### firewall_enable="YES" # Set to YES to enable firewall functionality firewall_script="/etc/ipfw.conf" # Which script to run to set up the firewall #firewall_enable="YES" # Firewall type (see /etc/rc.firewall) firewall_quiet="NO" # Set to YES to suppress rule display "/etc/rc.conf" 40 lines, 1486 characters written |
#1 11 seconds ago
![]() # #firewall_enable="YES" #firewall_type="OPEN" #firewall_script="/etc/rc.firewall #natd_enable="YES" # ### Basic network and firewall/security options: ### firewall_enable="YES" # Set to YES to enable firewall functionality firewall_script="/etc/ipfw.conf" # Which script to run to set up the firewall #firewall_enable="YES" # Firewall type (see /etc/rc.firewall) firewall_quiet="NO" # Set to YES to suppress rule display "/etc/rc.conf" 40 lines, 1486 characters written |
#1 11 seconds ago
# #firewall_enable="YES" #firewall_type="OPEN" #firewall_script="/etc/rc.firewall #natd_enable="YES" # ### Basic network and firewall/security options: ### firewall_enable="YES" # Set to YES to enable firewall functionality firewall_script="/etc/ipfw.conf" # Which script to run to set up the firewall #firewall_enable="YES" # Firewall type (see /etc/rc.firewall) firewall_quiet="NO" # Set to YES to suppress rule display "/etc/rc.conf" 40 lines, 1486 characters written |
#/etc/network restart
![]() bash: /etc/network: No such file or directory |
#/etc/network restart
![]() bash: /etc/network: No such file or directory |
#/etc/network restart
![]() bash: /etc/network: No such file or directory |
#vim /etc/ipfw.conf
|
#~
![]() # ### Basic network and firewall/security options: ### firewall_enable="YES" # Set to YES to enable firewall functionality firewall_script="/etc/ipfw.conf" # Which script to run to set up the firewall firewall_type="OPEN" # Firewall type (see /etc/rc.firewall) firewall_logging="NO" # Set to YES to enable events logging #firewall_script="/etc/ipfw.conf" # Which script to run to set up the firewall firewall_flags="" w.conf" # Firewall type (see /etc/rc.firewall) firewall_type="/etc/ipf" # Firewall type (see /etc/rc.firewall) natd_enable="YES" # Enable natd (if firewall_enable == YES). natd_program="/sbin/natd" # path to natd, if you want a different one. "/etc/rc.conf" 34 lines, 1335 characters written |
#~
# ### Basic network and firewall/security options: ### firewall_enable="YES" # Set to YES to enable firewall functionality firewall_script="/etc/ipfw.conf" # Which script to run to set up the firewall firewall_type="OPEN" # Firewall type (see /etc/rc.firewall) firewall_logging="NO" # Set to YES to enable events logging #firewall_script="/etc/ipfw.conf" # Which script to run to set up the firewall firewall_flags="" w.conf" # Firewall type (see /etc/rc.firewall) firewall_type="/etc/ipf" # Firewall type (see /etc/rc.firewall) natd_enable="YES" # Enable natd (if firewall_enable == YES). natd_program="/sbin/natd" # path to natd, if you want a different one. "/etc/rc.conf" 34 lines, 1335 characters written |
#/etc/netstart restart
![]() devd already running? (pid=665). lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5 inet6 ::1 prefixlen 128 inet 127.0.0.1 netmask 0xff000000 re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=1b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING> inet 192.168.16.24 netmask 0xffffff00 broadcast 192.168.16.255 ether 00:16:4e:00:00:04 media: Ethernet autoselect (100baseTX <full-duplex>) ... 00020 allow tcp from any to any 00030 allow tcp from any to any dst-port 5902 Firewall rules loaded. net.inet.ip.fw.enable: 1 -> 1 add net default: gateway 192.168.16.254 add net 192.168.54.32: gateway 192.168.54.30 add net 192.168.54.64: gateway 192.168.54.30 add net 192.168.54.96: gateway 192.168.54.30 add net 192.168.54.128: gateway 192.168.54.30 Additional routing options:. |
#/etc/netstart restart
devd already running? (pid=665). lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5 inet6 ::1 prefixlen 128 inet 127.0.0.1 netmask 0xff000000 re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=1b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING> inet 192.168.16.24 netmask 0xffffff00 broadcast 192.168.16.255 ether 00:16:4e:00:00:04 media: Ethernet autoselect (100baseTX <full-duplex>) ... 00020 allow tcp from any to any 00030 allow tcp from any to any dst-port 5902 Firewall rules loaded. net.inet.ip.fw.enable: 1 -> 1 add net default: gateway 192.168.16.254 add net 192.168.54.32: gateway 192.168.54.30 add net 192.168.54.64: gateway 192.168.54.30 add net 192.168.54.96: gateway 192.168.54.30 add net 192.168.54.128: gateway 192.168.54.30 Additional routing options:. |
#ipfw list
![]() 00010 allow ip from any to any 00020 allow tcp from any to any 00030 allow tcp from any to any dst-port 5902 65535 deny ip from any to any |
#ipfw list
00010 allow ip from any to any 00020 allow tcp from any to any 00030 allow tcp from any to any dst-port 5902 65535 deny ip from any to any |
#ipfw flush
![]() Are you sure? [yn] y Flushed all rules. |
#ipfw flush
Are you sure? [yn] y Flushed all rules. |
#vim /etc/ipfw.conf
|
#~
![]() add 010 allow ip from any to any add 020 allow tcp from any to any add 030 allow tcp from any to any 5902 "/etc/ipfw.conf" 3 lines, 107 characters |
#~
add 010 allow ip from any to any add 020 allow tcp from any to any add 030 allow tcp from any to any 5902 "/etc/ipfw.conf" 3 lines, 107 characters |
#~
![]() # ### Basic network and firewall/security options: ### firewall_enable="YES" # Set to YES to enable firewall functionality #firewall_script="/etc/ipfw.conf" # Which script to run to set up the firewall firewall_type="/etc/ipfw.conf" # Firewall type (see /etc/rc.firewall) firewall_logging="NO" # Set to YES to enable events logging firewall_flags="" # Flags passed to ipfw when type is a file natd_enable="YES" # Enable natd (if firewall_enable == YES). natd_program="/sbin/natd" # path to natd, if you want a different one. natd_interface="re0" # Public interface or IPaddress to use. natd_flags="" # Additional flags for natd. |
#~
# ### Basic network and firewall/security options: ### firewall_enable="YES" # Set to YES to enable firewall functionality #firewall_script="/etc/ipfw.conf" # Which script to run to set up the firewall firewall_type="/etc/ipfw.conf" # Firewall type (see /etc/rc.firewall) firewall_logging="NO" # Set to YES to enable events logging firewall_flags="" # Flags passed to ipfw when type is a file natd_enable="YES" # Enable natd (if firewall_enable == YES). natd_program="/sbin/natd" # path to natd, if you want a different one. natd_interface="re0" # Public interface or IPaddress to use. natd_flags="" # Additional flags for natd. |
#vim /etc/rc.conf
|
#vim /etc/inetd.conf
![]() --- /tmp/l3-saved-1169.24067.11492 2009-08-05 21:23:22.000000000 +0300 +++ /etc/inetd.conf 2009-08-05 21:24:09.000000000 +0300 @@ -10,7 +10,7 @@ #ftp stream tcp6 nowait root /usr/libexec/ftpd ftpd -l #ftp stream tcp nowait root /usr/libexec/lukemftpd ftpd -l -r #ftp stream tcp6 nowait root /usr/libexec/lukemftpd ftpd -l -r -#ssh stream tcp nowait root /usr/sbin/sshd sshd -i -4 +ssh stream tcp nowait root /usr/sbin/sshd sshd -i -4 #ssh stream tcp6 nowait root /usr/sbin/sshd sshd -i -6 telnet stream tcp nowait root /usr/libexec/telnetd telnetd #telnet stream tcp6 nowait root /usr/libexec/telnetd telnetd |
#vim /etc/inetd.conf
--- /tmp/l3-saved-1169.24067.11492 2009-08-05 21:23:22.000000000 +0300 +++ /etc/inetd.conf 2009-08-05 21:24:09.000000000 +0300 @@ -10,7 +10,7 @@ #ftp stream tcp6 nowait root /usr/libexec/ftpd ftpd -l #ftp stream tcp nowait root /usr/libexec/lukemftpd ftpd -l -r #ftp stream tcp6 nowait root /usr/libexec/lukemftpd ftpd -l -r -#ssh stream tcp nowait root /usr/sbin/sshd sshd -i -4 +ssh stream tcp nowait root /usr/sbin/sshd sshd -i -4 #ssh stream tcp6 nowait root /usr/sbin/sshd sshd -i -6 telnet stream tcp nowait root /usr/libexec/telnetd telnetd #telnet stream tcp6 nowait root /usr/libexec/telnetd telnetd |
#killall -1 inetd
![]() |
#killall -1 inetd
|
#telnet 127.0.0.1
![]() Trying 127.0.0.1... Connected to localhost.net.nt. Escape character is '^]'. Trying SRA secure login: User (root): root Password: [ SRA login failed ] User (root): Password: [ SRA login failed ] ... along with the mailing lists, can be searched by going to http://www.FreeBSD.org/search/. If the doc distribution has been installed, they're also available formatted in /usr/share/doc. If you still have a question or problem, please take the output of `uname -a', along with any relevant error messages, and email it as a question to the questions@FreeBSD.org mailing list. If you are unfamiliar with FreeBSD's directory layout, please refer to the hier(7) manual page. If you are not familiar with manual pages, type `man man'. You may also use sysinstall(8) to re-enter the installation and configuration utility. Edit /etc/motd to change this login announcement. |
#telnet 127.0.0.1
Trying 127.0.0.1... Connected to localhost.net.nt. Escape character is '^]'. Trying SRA secure login: User (root): root Password: [ SRA login failed ] User (root): Password: [ SRA login failed ] ... along with the mailing lists, can be searched by going to http://www.FreeBSD.org/search/. If the doc distribution has been installed, they're also available formatted in /usr/share/doc. If you still have a question or problem, please take the output of `uname -a', along with any relevant error messages, and email it as a question to the questions@FreeBSD.org mailing list. If you are unfamiliar with FreeBSD's directory layout, please refer to the hier(7) manual page. If you are not familiar with manual pages, type `man man'. You may also use sysinstall(8) to re-enter the installation and configuration utility. Edit /etc/motd to change this login announcement. |
$exit
![]() exit Connection closed by foreign host. |
$exit
![]() exit Connection closed by foreign host. |
#vim /etc/host
![]() --- /tmp/l3-saved-1169.31249.17887 2009-08-05 21:26:39.000000000 +0300 +++ /etc/hosts.allow 2009-08-05 21:33:51.000000000 +0300 @@ -89,3 +89,8 @@ ALL : ALL \ : severity auth.info \ : twist /bin/echo "You are not welcome to use %d from %h." +# +# Rules for telnet +telnetd : 192.168.54./27 : allow +telnetd : 127.0.0.0/255.0.0.0 : allow +telnetd : ALL: deny |
#vim /etc/hostsal
![]() --- /tmp/l3-saved-1169.15044.21307 2009-08-05 21:38:33.000000000 +0300 +++ /etc/rc.conf 2009-08-05 21:39:49.000000000 +0300 @@ -32,3 +32,4 @@ natd_program="/sbin/natd" # path to natd, if you want a different one. natd_interface="re0" # Public interface or IPaddress to use. natd_flags="" # Additional flags for natd. +sshd_enable="YES" |
#vim /etc/hosts.allow
![]() --- /tmp/l3-saved-1169.10770.26077 2009-08-05 21:40:28.000000000 +0300 +++ /etc/ssh/ssh_config 2009-08-05 21:41:50.000000000 +0300 @@ -44,3 +44,4 @@ # TunnelDevice any:any # PermitLocalCommand no # VersionAddendum FreeBSD-20061110 +PermitRootLogin Yes |
#vim /etc/host
![]() --- /tmp/l3-saved-1169.31249.17887 2009-08-05 21:26:39.000000000 +0300 +++ /etc/hosts.allow 2009-08-05 21:33:51.000000000 +0300 @@ -89,3 +89,8 @@ ALL : ALL \ : severity auth.info \ : twist /bin/echo "You are not welcome to use %d from %h." +# +# Rules for telnet +telnetd : 192.168.54./27 : allow +telnetd : 127.0.0.0/255.0.0.0 : allow +telnetd : ALL: deny |
#vim /etc/hostsal
![]() --- /tmp/l3-saved-1169.15044.21307 2009-08-05 21:38:33.000000000 +0300 +++ /etc/rc.conf 2009-08-05 21:39:49.000000000 +0300 @@ -32,3 +32,4 @@ natd_program="/sbin/natd" # path to natd, if you want a different one. natd_interface="re0" # Public interface or IPaddress to use. natd_flags="" # Additional flags for natd. +sshd_enable="YES" |
#vim /etc/hosts.allow
--- /tmp/l3-saved-1169.10770.26077 2009-08-05 21:40:28.000000000 +0300 +++ /etc/ssh/ssh_config 2009-08-05 21:41:50.000000000 +0300 @@ -44,3 +44,4 @@ # TunnelDevice any:any # PermitLocalCommand no # VersionAddendum FreeBSD-20061110 +PermitRootLogin Yes |
#killall -1 inetd
![]() |
#killall -1 inetd
|
#telnet 127.0.0.1
![]() Trying 127.0.0.1... Connected to localhost.net.nt. Escape character is '^]'. Trying SRA secure login: User (root): ^C |
Время первой команды журнала | 19:30:54 2009- 8- 5 | |||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 20:34:06 2009- 8- 5 | |||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 24.75 | |||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 2.97 | |||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.05 | |||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.60 | |||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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