Last
Update: 2007/05/03
For
FreeBSD 5.5
以下のinetd.confの変更にはviというFreeBSDでは付属でついてるエディタの操作知識が必要になります。
簡単なことだけ説明するので後の詳しい部分は自分で検索して下さい。
多少癖のある奴ですがデフォルトで入っているので他の*BSDなマシンを触る時に必要になるので覚えてといて損はないです。
簡単なviの操作知識
まず、viエディタにはコマンドラインモードと編集モードがあります。
起動直後はコマンドラインモードです。
|
結果 |
備考 |
|
| 移動 | コマンドラインモードで←↑↓→ | 基本矢印キーだけどHとかKでもできる |
| 編集モードにする | コマンドラインモードでa | カーソルの右側に文字を入力 |
| 編集モード →コマンドラインモード |
Esc | 切り替わった時にピッ!と音がなる。 |
| 保存 | コマンドラインモードで:w | 強制的にするには:q! !を付ける |
| 終了 | コマンドラインモードで:q | 強制的にするには:q! !を付ける |
| 保存して終了 | コマンドラインモードで:wq | 保存と終了のコマンドを一回でやっただけ |
| $su #vi /etc/inetd.conf |
| # $FreeBSD: src/etc/inetd.conf,v 1.69.2.1
2006/03/28 15:52:12 ceri Exp $ # # Internet server configuration database # # Define *both* IPv4 and IPv6 entries for dual-stack support. # To disable a service, comment it out by prefixing the line with '#'. # To enable a service, remove the '#' at the beginning of the line. # #ftp stream tcp nowait root /usr/libexec/ftpd s ftpd -l #ftp stream tcp6 nowait root /usr/libexec/ftpd ftpd -l #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 |
| #vi /etc/rc.conf |
| # -- sysinstall generated deltas -- # Wed
May 2 22:54:01
2007 ifconfig_lnc0="DHCP" hostname="bsd.localdomain" inetd_enable="YES" |
| #shutdown -h now |
|
$ ps axf |grep inetd 455 ?? Is 0:00.02 /usr/sbin/inetd -wW -C 60 693 p0 S+ 0:00.02 grep inetd $ |
| $ ifconfig lnc0: flags=108843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 inet6 fe80::20c:29ff:fed3:6720%lnc0 prefixlen 64 scopeid 0x1 inet 192.168.1.7 netmask 0xffffff00 broadcast 192.168.1.255 ether 00:0c:29:d3:67:20 plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST> mtu 1500 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet 127.0.0.1 netmask 0xff000000 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 $ |
|
Microsoft Windows XP [Version 5.1.2600] C:\WINDOWS\system32>telnet 192.168.1.7 |

| $ ps axf |grep telnetd 516 p0 R+ 0:00.01 grep telnetd $ |
| $ telnet localhost Trying ::1... telnet: connect to address ::1: Connection refused Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Trying SRA secure login: User (tanaka): ^Z[1] + Suspended telnet localhost $ |
| $ ps axf |grep telnetd 560 ?? Ss 0:00.10 telnetd 564 p0 R+ 0:00.01 grep telnetd $ |
| %ifconfig fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=8<VLAN_MTU> inet 192.168.1.13 netmask 0xffffff00 broadcast 192.168.1.255 inet6 fe80::240:caff:fe1d:9d1f%fxp0 prefixlen 64 scopeid 0x1 ether 00:40:ca:1d:9d:1f media: Ethernet autoselect (100baseTX <full-duplex>) status: active plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST> mtu 1500 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet 127.0.0.1 netmask 0xff000000 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 % |
|
# PCI
Ethernet NICs that use the common MII bus controller code. |