FreeBSD-11.0-RELEASE amd64 をカスタムOSインストール機能を使うに従い、導入を行う。
| 項目 | 設定値 | |||
|---|---|---|---|---|
| Keymap Selection | Continue with default keymap | |||
| Set Hostname | ホスト名 | |||
| Distribution Select | [ ]base-dbg [ ]doc [ ]kernel-dbg [ ]lib32-dbg [*]lib32 [ ]ports [*]src [ ]tests |
|||
| Network Configuration | vtnet0 | |||
| em0 | Would you like to configure IPv4 for this interface? | Yes | ||
| Would you like to use DHCP to configure this interface? | No | |||
| Static Network Interface Configuration | IP Address | さくらのVPSで割り当てられたIP | ||
| Subnet Mask | さくらのVPSで割り当てられた subnet mask | |||
| Default Router | さくらのVPS指定のデフォルトゲートウェイ | |||
| Would you like to configure IPv6 for this interface? | No | |||
| Resolver Configuration | Search | - | ||
| IPv4 DNS #1 | DNSサーバを指定 | |||
| IPv4 DNS #2 | DNSサーバを指定 | |||
| Mirror Selection | 近場を指定。 | |||
| Partitioning | Auto (UFS) | |||
| Partition | Entire Disk | |||
| Partition Scheme | BSD | |||
| Partition Editor | 提示された内容で Finish → Commit | |||
| 項目 | 設定値 |
|---|---|
| New Password | rootパスワードを設定 |
| Time Zone Selector | Asia |
| Countries in Asia | Japan |
| Time & Date | 日付を確認後 <Set Date> |
| 時刻を確認後 <Set Time> | |
| System Configuration | [*]local_unbound [ ]sshd [ ]moused [*]ntpd [ ]powered [ ]dumpdev |
| System Hardening | [ ]Hide processes running as other users [ ]Hide processes running as other groups [ ]Disable reading kernel message buffer for unprivileged users [ ]Disable process debugging facilities for unprivileged users [ ]Randomize the PID of newly created processes [ ]Insert stack guard page ahead of the growable segments [*]Clean the /tmp filesystem on system startup [*]Disable opening Syslogd network socket (disables remote logging) [ ]Disable Sendmail service |
| Add User Accounts | No |
参照先DNSサーバが DNSSEC をサポートしていない場合1)、 /var/unbound/unbound.conf 内の auto-trust-anchor-file 行をコメントアウトする。
# auto-trust-anchor-file: /var/unbound/root.key
編集後、service を再起動し、drillで確認する。
# service local_unbound restart Stopping local_unbound. Waiting for PIDS: 1119. Starting local_unbound. Waiting for nameserver to start... good # # drill www.hoge.org ;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 13790 ;; flags: gr rd ra ; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2 ;; QUESTION SECTION: ;; www.hoge.org. IN A ;; ANSWER SECTION: www.hoge.org. 1643 IN A xxx.xxx.xxx.xxx <以下略>
freebsd-updateを行う。
# freebsd-update fetch # freebsd-update install
kernelを編集し、VIMAGE対応とする。
/usr/src/sys/amd64/conf/GENERICをVPSとしてコピーして編集する。
#ident GENERIC ident VPS options VIMAGE #device fdc
ハンドブックに従い、worldとkernelの構築を行う。
ntpd_enable="YES"
restrict default limited kod nomodify notrap nopeer noquery server ntp1.sakura.ad.jp
#ntpq -c as ind assID status conf reach auth condition last_event cnt =========================================================== 1 53548 9614 yes yes none sys.peer reachable 1
/etc/rc.confに追記。
firewall_enable="YES" firewall_nat_enable="YES" firewall_type="open"