Last Edit Date: 09/03/2008
FreeBSDサーバーの設定ファイルのまとめ
それぞれのプログラムの設定ファイルはそれぞれの解説で書かれえいますが、 問題がどこだか切り分けられないときのために、確認するとよい基本的なファイルを説明します。
/etc/rc.conf
linux_enable="YES"
##gmirror
dumpdev="NO"
##pppoe
ppp_enable="YES"
ppp_mode="ddial"
ppp_profile="pppoe"
ppp_nat="NO"
##ipfiter
ipfilter_enable="YES"
ipfilter_rules="/etc/ipf.rules"
ipfilter_flags=""
ipmon_enable="YES"
ipmon_flags="-D /var/log/ipf.log" <--logファイルの名称とディレクトリを指定
gateway_enable="YES" <--これがないとこのドメインのPCは外に出れません。
#bind
named_enable="YES"
#dovecot
dovecot_enable=YES"
#httpd
apache22_enable="YES"
apache22_http_accept_enable="YES"
default_gateway="xxx.xxx.xxx.xx1"
hostname="ns1.abc.com"
ifconfig_re0="inet xxx.xxx.xxx.xx1 netmask 255.255.255.248"
ifconfig_re1="inet xxx.xxx.xxx.xx2 netmask 255.255.255.248"
##rc.conf end
/etc/resolve.conf
domain abc.com
domain bbb.com
domain ccc.com
nameserver xxxx.xxx.xxx.xx2
nameserver 127.0.0.1
##resolve.conf end
/etc/hosts
::1 localhost localhost.abc.com
127.0.0.1 localhost localhost.abc.com
xxx.xxx.xxx.xx2 ns1.abc.com ns1
xxx.xxx.xxx.xx2 ns1.abc.com.
#hosts end
networkのチェック コマンド 詳しくはネットで検索してください。
まずはbindが動いているのかが一番重要です!
#host
#nslookup
で確認を!
ping これはご存知のものですが、 xxx.xxx.xxx.xx1にpingすると次のようなエラーを返します。
ping: sendto:Host is down
しかしFreeBSD STABLE July 2008では何も返しません。 延々と待ち続けます。 多分bugでしょう。 気にしないでください。 これは後で解説します。
pingで外部のサイトにからエコーが返るか見てみましょう。
おかしいと思われるときには
ifconfigでethernetの設定があっているかの確認
大幅に省略して書きます。
ifconfig
re0: xxx.xxx.xxx.xx1
re1: xxx.xxx.xxx.xx2
l0:
tun0: xxx.xxx.xxx.xx1 --> xxx.xxx.xxx.xxx <--これはpppoeが取得したispのipアドレス
のはずですが、7.0 STABLEはおかしな表示をします。 気にしないでください! 多分? 今のところ障害は出ていないようです。 そのうち修正されるでしょう?
次は
netstat -rn
Routing tables
Internet:
Destination Gateway
default outside-gw <--- pppoeで取得したISPのipのはずですが?? 違っている?
127.0.0.1 .......................
途中省略
xxxx.xxx.xxx.xxx xxx.xxx.xxx.xx1 最初のアドレスがpppoeで取得したispのipのはずですが?? 違っている?
ということになりました!
ですから
tracerouteでは
traceroute www.xyz.net とすると
traceroute to www.xyz.net (xxx.xxx.xxx.xxx)
1. ここのipがとんでもないものになる
2. ここのipは本来ならispのipのはずが??
なんかrouting tableからの値の取得がおかしいように感じます。 でも動いているので気にしません。 そのうち修正されるでしょう。
FreeBSD.orgでは、解決方法が書いてあります。 6.Xを使えと!
新しいSMPサポートを長いこと待っていたのにこれかよ!
ということで自分でdebugする気はさらさらないので、tableがおかしいのは無視しましょう!
logをrotateするためにnewsyslog.confにいろいろと設定しますが、詳細はそれぞれのところで解説していますが、より詳しくは
http://www.freebsd.org/cgi/man.cgi?query=newsyslog.conf&sektion=5
| Advertisement |
|
|