PinePhone 人柱エディション(Braveheart Edition)を使うにあたり初期情報集め

PinePhoneが届いたようなので、使うための情報をつらつらと・・・

2020/02/06追記:届いていろいろやってますが、なんというか気軽に紹介記事を作れるような状態ではないので、togetterでまとめた「PinePhone Braveheart Editionを手に入れた」を参照してください。

情報源

PinePhoneの基本情報:PINE64 wikiの「PinePhone
今回出荷のPinePhone BraveHeart Editionのハードウェア情報: PINE64 wikiの「PinePhone v1.1 – Braveheart

PinePhoneで使えるOSについての情報:PINE64 wikiの「PinePhone Software Release

重要情報

Braveheart Editionは、バッテリー組み込み済みで出荷しているが、絶縁のためプラスチックシートが入っている。使用する際には取り除くこと。

また、携帯モデム部(EG25-G)とWiFi/Bluetooth部(RTL8723CS)は、バッテリー接続状態でないと使えないとのこと。(It’s also important to note that the EG25 modem and RTL8723CS wifi/bluetooth do not work without the battery plugged in, even if you are supplying enough power to the Pinephone with USB-C)

USB Type-Cで電源供給しているのにネットワークにつながらない、というような場合、バッテリーがきちんと接続されているかを確認すること。

当初、Braveheart Editionの内蔵ストレージ(eMMC)にはOSが入ってない、という話でしたが、動作テスト用に postmarketOS の特別版が入っているとのこと。ただし、いろいろと機能がかけているようなのでテスト利用にとどめること。

PinePhoneのOSは内蔵ストレージeMMCとmicroSDのどちらにもインストールできる。標準設定ではmicroSD側を優先してOSを起動する。

使えるOSについて

PINE64 wikiの「PinePhone Software Release」を参照し、img.gzとなっているイメージをダウンロードして、microSDに書き込む。

現状、SailfishOSはmicroSDにパーテーション分けが必要なようで、Linux環境向けのブート用microSD作成スクリプトの提供となっている。

webOSベースのLunaOSの場合は、bmaptoolコマンドを使いブート用microSDを作ることを推奨している。 使わなくても普通にdd相当で書き込みはできた(Windows上でrufusを使った)

rsyncによるディレクトリ同期を行う際、並列実行により高速化する手法

rsyncを高速化するために、分散して実行することにした。

全部を1つのスクリプトとしてもいいのだが、デバグがしやすいように分割して作業を行えるようにしている。

また、下記の記述はLinuxの/usrをコピーすることを想定している。環境に応じて書き換えること。

まず、/usr/xxx以下にあるファイルまでをコピーするために以下を実行する。

# rsync --archive -v --exclude="*/*/" /usr/ /mnt/vol/voltest

このexcludeオプションをつけている場合、「/usr/xxx/yyy」のファイルとシンボリックリンクはコピーされる。しかし「/usr/xxx/zzz/」のディレクトリはコピーされない。

次に、「/usr/xxx/zzz/」のディレクトリ一覧を取得する。

# find /usr -mindepth 2 -maxdepth 2 -type d -print

このディレクトリ一覧を下記のperlスクリプトに食わせる。(下記スクリプトは” find /usr -mindepth 2 -maxdepth 2 -type d -print > list.txt”で取得したlist.txtを使う想定)

#!/usr/bin/perl

use threads;
use Thread::Queue;

my $LOGDIR="/root/test";
my $MAXSESSION=5;

my $sourcepathbase="/usr";
my $destpathbase="/mnt/vol/voltest";

my $stream = Thread::Queue->new;

open(FILE,"list.txt");
while(my $tmp=<FILE>){
        $stream->enqueue("$tmp");

}
close(FILE);

sub SyncExecute{
        while(my $str = $stream->dequeue){
                # 改行削除
                $str =~ s/\n//ig;
                $str =~ s/\r//ig;
                # ログ出力用ファイル名
                my $filename=$str;
                $filename =~ s/\//-/ig;
                $filename =~ s/\.//ig;
                $filename =~ s/-$//ig;
                $filename =~ s/#//ig;
                $filename =~ s/^-//ig;
                $filename =~ s/ //ig;
                my $logfile="$LOGDIR/test-$filename.log";
                # rsync元と先の処理
                my $tmp,$st,$ed;
                my $sourcepath,$destpath;
                $tmp=substr($str,0,1);
                if($tmp eq "/"){
                        $sourcepath=$sourcepathbase.$str."/";
                        $destpath=$destpathbase.$str;
                }else{
                        $sourcepath=$sourcepathbase."/".$str."/";
                        $destpath=$destpathbase."/".$str;
                }
                `date >> $logfile`;
                print "rsync -v --archive $sourcepath $destpath >> $logfile 2>&1 \n";
                `rsync -v --archive $sourcepath $destpath >> $logfile 2>&1 `;
                `date >> $logfile`;
                #`sleep 5`;
        }
}


my @kids;
foreach(1..$MAXSESSION){
        my $kid = threads->new(\&SyncExecute,$stream);
        push(@kids,$kid);
        $stream->enqueue(undef);
}


print "wait\n";

foreach(@kids){
        my ($return) =$_ -> join;
}

このスクリプトは、rsyncの同時実行数5で、並列にrsyncを実行していくものになっている。

実行したサーバの負荷状況に応じて「my $MAXSESSION=5;」で設定している 同時実行数 を調整する。あまり大きくしすぎるとサーバからの応答が遅くなりすぎるのでほどほどに・・・


2020/03/10追記

上記で実行するrsyncコマンドはハードリンクの処理を行わないものとなっている。

このため、ハードリンクされているファイルがある場合、コピー先のファイルが1つではなく複数別個のものとしてコピーされる。

ハードリンクをそのままコピーしたい場合は「–hard-links」オプションを追加する必要があるのだが、ハードリンク処理の効力範囲は同一プロセス内で処理すること、という条件があるため、今回のような分割処理して高速化する、という場合には不適切となっている。

このため、ハードリンクファイルがある場合は、初回同期は分割処理で行い、2回目はディレクトリ全体を–hard-linksオプションをつけて1プロセスで処理してハードリンク処理を行わせる、という手法をとる必要がある。

なお、ハードリンク処理が完了したあと、分割処理の対象となった場合、すでにファイルが存在しているので再コピーされる、ということは発生しない。

GL.iNet GL-MV1000でDynamic DNSが動かない

GL.iNet GL-MV1000のlcuiの方でdyn.comのDynamic DNSを設定したのだが、再起動時に自動実行してくれない。

設定画面としては下記の様になっている。

Enabledにチェックが入っているので、自動起動してもよさそうなのだがしていない。

とりあえず起動の仕組みをさぐるため、ルータにrootでログイン。

とりあえず「/etc/init.d」にはどんなファイルがあるのか確認してみると「ddns」というソレっぽいファイルが。

root@GL-MV1000:~# ls /etc/init.d
boot              firewall          gl_s2s            initswitch        openvpn           sysctl            usbmode
bootcount         firewall_gl       gl_tertf          led               qosswitch         sysfixtime        vpn-service
clear_flag        gl_fixdomain      gl_udp_server     lighttpd          relayd            sysntpd           wireguard
cron              gl_init           glcrond           log               rpcd              system            wireguard_server
ddns              gl_monitor        glfw              modem-init        samba             ucitrack
dnsmasq           gl_mqtt           glqos             mwan3             smstools3         uhttpd
done              gl_mv1000         gpio_switch       network           startvpn          umount
dropbear          gl_route_policy   haveged           odhcpd            stubby            urandom_seed
root@GL-MV1000:~#

/etc/rc.dには「S95ddns」と「K10ddns」(どちらも/etc/init.d/ddnsへのシンボリックリンク)

root@GL-MV1000:~# ls /etc/rc.d
K10ddns              S00sysfixtime        S19dnsmasq           S50glfw              S95ddns              S99lighttpd
K10gpio_switch       S10boot              S19dropbear          S50stubby            S95done              S99startvpn
K50dropbear          S10gl_mv1000         S19firewall          S60samba             S96led               S99urandom_seed
K51stubby            S10system            S19mwan3             S70modem-init        S98sysntpd           S99wireguard
K85odhcpd            S11sysctl            S20network           S80gl_tertf          S99bootcount         S99wireguard_server
K89log               S12log               S20usbmode           S80relayd            S99gl_monitor
K90network           S12rpcd              S21initswitch        S80ucitrack          S99gl_mqtt
K90sysfixtime        S13haveged           S35odhcpd            S90vpn-service       S99gl_route_policy
K98boot              S15gl_fixdomain      S50cron              S94gpio_switch       S99gl_s2s
K99umount            S18firewall_gl       S50glcrond           S94smstools3         S99gl_udp_server
root@GL-MV1000:~#

すでに/etc/rc.d/S95ddnsがあるので起動時から動作していても良さそうなのにしていない、ということはスクリプトの中で何らかの処理を行っているはず、ということで中身を確認。

root@GL-MV1000:~# cat /etc/init.d/ddns
#!/bin/sh /etc/rc.common
START=95
STOP=10
boot() {
return 0
}
reload() {
/usr/lib/ddns/dynamic_dns_updater.sh -- reload
return 0
}
restart() {
/usr/lib/ddns/dynamic_dns_updater.sh -- stop
sleep 1
enable=`uci -q get ddns.glddns.enabled`
if [ "$enable" = 1 ];then
        /usr/lib/ddns/dynamic_dns_updater.sh -- start
fi
}
start() {
enable=`uci -q get ddns.glddns.enabled`
if [ "$enable" = 1 ];then
        /usr/lib/ddns/dynamic_dns_updater.sh -- start
fi
}
stop() {
/usr/lib/ddns/dynamic_dns_updater.sh -- stop
return 0
}
root@GL-MV1000:~#

「start()」で「uci -q get ddns.glddns.enabled」の値を確認している。

root@GL-MV1000:~# uci -q get ddns.glddns.enabled
root@GL-MV1000:~#

現状は値が設定されていないため、起動していないようだ。

uciのパラメータを全部確認する場合は「uci -q show」で確認できるので、「uci -q show|grep dns.」を実行してみた。

root@GL-MV1000:~# uci -q show|grep dns.
ddns.global=ddns
ddns.global.ddns_dateformat='%F %R'
ddns.global.ddns_loglines='250'
ddns.global.upd_privateip='0'
ddns.myddns_ipv4=service
ddns.myddns_ipv4.lookup_host='yourhost.example.com'
ddns.myddns_ipv4.domain='yourhost.example.com'
ddns.myddns_ipv4.username='your_username'
ddns.myddns_ipv4.password='your_password'
ddns.myddns_ipv4.interface='wan'
ddns.myddns_ipv4.ip_source='network'
ddns.myddns_ipv4.ip_network='wan'
ddns.myddns_ipv4.service_name='dyn.com'
ddns.myddns_ipv4.enabled='0'
ddns.myddns_ipv6=service
ddns.myddns_ipv6.update_url='http://[USERNAME]:[PASSWORD]@your.provider.net/nic/update?hostname=[DOMAIN]&myip=[IP]'
ddns.myddns_ipv6.lookup_host='yourhost.example.com'
ddns.myddns_ipv6.domain='yourhost.example.com'
ddns.myddns_ipv6.username='your_username'
ddns.myddns_ipv6.password='your_password'
ddns.myddns_ipv6.use_ipv6='1'
ddns.myddns_ipv6.interface='wan6'
ddns.myddns_ipv6.ip_source='network'
ddns.myddns_ipv6.ip_network='wan6'
ddns.myddns_ipv6.enabled='0'
ddns.osakana=service
ddns.osakana.enabled='1'
ddns.osakana.lookup_host='********************'
ddns.osakana.service_name='dyn.com'
ddns.osakana.domain='********************'
ddns.osakana.username='********************'
ddns.osakana.password='********************'
dhcp.@dnsmasq[0]=dnsmasq
dhcp.@dnsmasq[0].domainneeded='1'
dhcp.@dnsmasq[0].boguspriv='1'
dhcp.@dnsmasq[0].filterwin2k='0'
dhcp.@dnsmasq[0].localise_queries='1'
dhcp.@dnsmasq[0].rebind_protection='1'
dhcp.@dnsmasq[0].rebind_localhost='1'
dhcp.@dnsmasq[0].local='/lan/'
dhcp.@dnsmasq[0].domain='lan'
dhcp.@dnsmasq[0].expandhosts='1'
dhcp.@dnsmasq[0].nonegcache='0'
dhcp.@dnsmasq[0].authoritative='1'
dhcp.@dnsmasq[0].readethers='1'
dhcp.@dnsmasq[0].leasefile='/tmp/dhcp.leases'
dhcp.@dnsmasq[0].resolvfile='/tmp/resolv.conf.auto'
dhcp.@dnsmasq[0].nonwildcard='1'
dhcp.@dnsmasq[0].localservice='1'
glconfig.ddns=service
glconfig.ddns.enabled='0'
luci.diag.dns='openwrt.org'
ucitrack.@dhcp[0].init='dnsmasq'
root@GL-MV1000:~#

ん?

「glconfig.ddns.enabled=’0’」?

もしかして、GL.iNet Admin Panelの方にある???

[アプリケーション]-[リモートアクセス]に「ダイナミックDNS」がありました。

有効化をしてみます

これにより「uci -q show|grep dns.」に大きな変化が・・・

root@GL-MV1000:~# uci -q show|grep dns.
ddns.global=ddns
ddns.global.ddns_dateformat='%F %R'
ddns.global.ddns_loglines='250'
ddns.global.upd_privateip='0'
ddns.global.use_curl='1'
ddns.osakana=service
ddns.osakana.enabled='1'
ddns.osakana.lookup_host='*******************'
ddns.osakana.service_name='dyn.com'
ddns.osakana.domain='*******************'
ddns.osakana.username='*******************'
ddns.osakana.password='*******************'
ddns.glddns=service
ddns.glddns.interface='wan'
ddns.glddns.check_interval='10'
ddns.glddns.check_unit='minutes'
ddns.glddns.force_interval='60'
ddns.glddns.force_unit='minutes'
ddns.glddns.ip_url='http://checkip.dyndns.com'
ddns.glddns.ip_source='web'
ddns.glddns.password='*******************'
ddns.glddns.username='*******************'
ddns.glddns.domain='cx0f702.glddns.com'
ddns.glddns.param_enc='cx0f702'
ddns.glddns.lookup_host='cx0f702.glddns.com'
ddns.glddns.service_name='glddns.com'
ddns.glddns.update_url='http://[USERNAME]:[PASSWORD]@ddns.glddns.com/nic/update?hostname=[PARAMENC]&myip=[IP]'
ddns.glddns.enabled='1'
dhcp.@dnsmasq[0]=dnsmasq
dhcp.@dnsmasq[0].domainneeded='1'
dhcp.@dnsmasq[0].boguspriv='1'
dhcp.@dnsmasq[0].filterwin2k='0'
dhcp.@dnsmasq[0].localise_queries='1'
dhcp.@dnsmasq[0].rebind_protection='1'
dhcp.@dnsmasq[0].rebind_localhost='1'
dhcp.@dnsmasq[0].local='/lan/'
dhcp.@dnsmasq[0].domain='lan'
dhcp.@dnsmasq[0].expandhosts='1'
dhcp.@dnsmasq[0].nonegcache='0'
dhcp.@dnsmasq[0].authoritative='1'
dhcp.@dnsmasq[0].readethers='1'
dhcp.@dnsmasq[0].leasefile='/tmp/dhcp.leases'
dhcp.@dnsmasq[0].resolvfile='/tmp/resolv.conf.auto'
dhcp.@dnsmasq[0].nonwildcard='1'
dhcp.@dnsmasq[0].localservice='1'
glconfig.ddns=service
glconfig.ddns.enabled='0'
glconfig.ddns.check_status='1'
glconfig.ddns.ddns_enabled='1'
glconfig.ddns.http_enabled='0'
glconfig.ddns.https_enabled='0'
glconfig.ddns.ssh_enabled='0'
luci.diag.dns='openwrt.org'
ucitrack.@dhcp[0].init='dnsmasq'
root@GL-MV1000:~#

そして、luciの方も無事Dynamic DNSが起動している状態となりました。

また、GL.iNetの提供するDynamic DNS(glddns)もあわせて有効になっています。

GL.iNet GL-MV1000をフレッツ光ネクストのIPv6網に接続した

GL.iNet GL-MV1000をバッファロー WSR-2533DHP2-CBのルーター機能の代わりに導入した。

うちはいまだにフレッツ光ネクスト+IPv6オプション環境なので、どうなるかなぁ?と思ったら標準設定ではIPv6での接続がうまくいかなかった。(注:BIGLOBE側の契約表記が「Bフレッツ マンションタイプ」のままなんだけど、フレッツ側の契約を確認してみるといつの間にか「フレッツ 光ネクスト」に切り替わっていた)

どうすればいいのかな?とググったら「フレッツ光 + OpenWrt で IPv6 を使う」に書いてある通りのことで対応できた。

GL.iNet GL-MV1000の標準状態で DHCPv6 クライアント の設定までは行われていたので、 /etc/config/dhcp のファイルを編集するだけで済んだ。

変更するためにはsshでアクセスして、rootユーザでログインすればOK

#初期状態
<略>
config dhcp 'lan'
	option interface 'lan'
	option start '100'
	option limit '150'
	option leasetime '12h'
	option force '1'
	option dhcpv6 'server'
	option ra 'server'

config dhcp 'wan'
	option interface 'wan'
	option ignore '1'
<略>

lanのところのdhcpv6とraの「server」を「relay」に変更し、ndpを追加

wan6を新規で追加し、項目を追加

# BフレッツIPv6対応
config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option force '1'
        option dhcpv6 'relay'
        option ra 'relay'
        option ndp 'relay'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

config dhcp 'wan6'
        option dhcpv6 'relay'
        option ra 'relay'
        option ndp 'relay'
        option master '1'

参考にしたblogだとコマンドで「uci commit /etc/config/dhcp」を実行すればOKとあったが、うまく行かなかったので、ルータを再起動したところうまくいった。

なお、手動で変更したあと、luciのGUIを確認してみたが、変更された項目はなかったので、「 Powered by LuCI openwrt-19.07 branch (git-19.218.48058-9177466) / OpenWrt 19.07-SNAPSHOT r10273-2b88d02」「GL-MV1000 version 3.027」ではGUIの変更ができないようでした。

cluster ONTAP/ONTAP9のNFS exports設定にNISホスト名が使えないのでdnsmasqでごまかすことにした

NetAppのcluster ONTAP8.x/ONTAP9はNISを使える、と書いてあるものの、詳細を確認すると、NISホスト名は使用できず、NISユーザとパスワード、NISグループ、NIS netgroup(ホスト名用のグループ)しか使えないとのこと。

NIS netgroup対応といっても、netgroupに含まれるホスト名にNIS ホスト名が許されるわけではなく、DNS起因のホスト名の使用が許される、というものでした。(ONTAPシミュレータで確認)

既存のDNSサーバにエントリを追加してもらえれば解決ではありますが、できるかどうかわからないので、お手軽にできる回避策として、RHEL6/RHEL7などの標準パッケージ群に含まれているdnsmasqを使用した簡易DNSサーバを立ててみることにした。

dnsmasqは/etc/hostsもしくはhostsフォーマットに準じたファイルを指定して、そこのエントリを元にDNS応答を返すことができる。

NISホスト名を「ypcat hosts」で一括出力するとhostsフォーマットでエントリが取得できるので、crontabで定期的に「ypcat hosts」を実行して情報更新を行い、dnsmasqでDNSで応答を返せるようにした。

まずは、DNSサーバのインストール。

[root@nisclient ~]# yum install dnsmasq
読み込んだプラグイン:fastestmirror
インストール処理の設定をしています
Loading mirror speeds from cached hostfile
 * base: ftp.nara.wide.ad.jp
 * extras: ftp.nara.wide.ad.jp
 * updates: ftp.nara.wide.ad.jp
依存性の解決をしています
--> トランザクションの確認を実行しています。
---> Package dnsmasq.x86_64 0:2.48-18.el6_9 will be インストール
--> 依存性解決を終了しました。

依存性を解決しました

================================================================================
 パッケージ       アーキテクチャ  バージョン                リポジトリー   容量
================================================================================
インストールしています:
 dnsmasq          x86_64          2.48-18.el6_9             base          150 k

トランザクションの要約
================================================================================
インストール         1 パッケージ

総ダウンロード容量: 150 k
インストール済み容量: 294 k
これでいいですか? [y/N]y
パッケージをダウンロードしています:
dnsmasq-2.48-18.el6_9.x86_64.rpm                         | 150 kB     00:00
rpm_check_debug を実行しています
トランザクションのテストを実行しています
トランザクションのテストを成功しました
トランザクションを実行しています
  インストールしています  : dnsmasq-2.48-18.el6_9.x86_64                    1/1
  Verifying               : dnsmasq-2.48-18.el6_9.x86_64                    1/1

インストール:
  dnsmasq.x86_64 0:2.48-18.el6_9

完了しました!
[root@nisclient ~]#

/etc に配置された設定ファイルを確認。

[root@nisclient ~]# ls -l /etc/dnsmasq.*
-rw-r--r--. 1 root root 21214 10月  3 08:18 2017 /etc/dnsmasq.conf

/etc/dnsmasq.d:
合計 0
[root@nisclient ~]#

NISで配布されたhostsを/etc/hosts-from-nisに保存するということにして、/etc/hosts は使用しない、ということにして、/etc/dnsmasq.conf の以下を変更

変更前
# If you don't want dnsmasq to read /etc/hosts, uncomment the
# following line.
#no-hosts
# or if you want it to read another file, as well as /etc/hosts, use
# this.
#addn-hosts=/etc/banner_add_hosts
変更後
# If you don't want dnsmasq to read /etc/hosts, uncomment the
# following line.
no-hosts
# or if you want it to read another file, as well as /etc/hosts, use
# this.
addn-hosts=/etc/hosts-from-nis

上記以外のエントリは標準設定のままです。NISから配布されたhostsを/etc/hosts-from-nisに保存

[root@nisclient ~]# ypcat hosts > /etc/hosts-from-nis
[root@nisclient ~]# cat /etc/hosts-from-nis
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
172.17.44.100   nfstest
172.17.44.49    server49      server49.vm2.example.com
172.17.44.49    server49      server49.vm2.example.com
172.17.44.87    server87
172.17.44.88    server88
172.17.44.89    server89
[root@nisclient ~]#

続いてfirewalld/iptablesの設定変更して、ポート53のtcp/udpを許可。

[root@nisclient ~]# cat /etc/sysconfig/iptables
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 53 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 53 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
[root@nisclient ~]# service iptables restart
iptables: チェインをポリシー ACCEPT へ設定中filter         [  OK  ]
iptables: ファイアウォールルールを消去中:                  [  OK  ]
iptables: モジュールを取り外し中:                          [  OK  ]
iptables: ファイアウォールルールを適用中:                  [  OK  ]
[root@nisclient ~]#

firewalldの場合は以下

-bash-4.2# firewall-cmd --list-all
public (active)
  target: default
  icmp-block-inversion: no
  interfaces: ens192
  sources:
  services: dhcpv6-client ssh
  ports:
  protocols:
  masquerade: no
  forward-ports:
  source-ports:
  icmp-blocks:
  rich rules:

-bash-4.2# firewall-cmd --permanent --zone=public --add-service=dns
success
-bash-4.2# firewall-cmd --reload
success
-bash-4.2# firewall-cmd --list-all
public (active)
  target: default
  icmp-block-inversion: no
  interfaces: ens192
  sources:
  services: dhcpv6-client dns ssh
  ports:
  protocols:
  masquerade: no
  forward-ports:
  source-ports:
  icmp-blocks:
  rich rules:

-bash-4.2#

で、dnsmasqを起動して、DNSにより名前解決ができるか確認してみます。

[root@nisclient ~]# service dnsmasq status
dnsmasq は停止しています
[root@nisclient ~]# service dnsmasq start
Starting dnsmasq:                                          [  OK  ]
[root@nisclient ~]# service dnsmasq status
dnsmasq (pid  1556) を実行中...
[root@nisclient ~]#

[root@nisclient ~]# nslookup nfstest 127.0.0.1
Server:         127.0.0.1
Address:        127.0.0.1#53

Name:   nfstest
Address: 172.17.44.100

[root@nisclient ~]#