2015年10月19日月曜日

★★★ make world ; openbsd follow current 

私見; 釈迦は 縁起に言及したと思うが 、空はどうかと思う。
さらに 日本に伝わった中国仏教は 中国の道教の思想(例えば無)に修飾されている。
したがって サンスクリット(文語)でかかれた経典 あるいは パーリ(口語)でかかれたものに 原点復帰しないといけないと思う

https://ja.wikipedia.org/wiki/%E9%BE%8D%E6%A8%B9 より
「空」の理論の大成は龍樹の『中論』などの著作によって果たされた。

龍樹は、存在という現象も含めて、あらゆる現象はそれぞれの因果関係の上に成り立っていることを論証している。
さらに、因果関係によって現象が現れているのであるから、それ自身で存在するという「独立した不変の実体」(=自性)はないことを明かしている。
これによって、すべての存在は無自性であり、「空」であると論証しているのである。

哲学者の梅原猛は、龍樹は釈迦の仏教を否定し、大乗仏教を創始したとしている

とにかく 仏教の空 は 無ではない。


follow current では
  全てをソースから作り直します。

いわば 古い工作機械が新設計図にのっとって 新しい部品を 全部設計図から古い工作機械でつくりなおし それを組み立てて 新しい工作機械をつくるんですね。 


なれたら 以下のように linuxの上で できます。
つまり 上の画面の赤で囲んだ部分だけが arch で
    それ以外は           qemu上のOpenbsdです。

しかし 初心のうちは openbsdでしましょう。 
なれたら linux のkvmの上で立ち上げたOpenBSDに linuxから sshではいってします。
下の図のごとくです
このこと自体は新しいことでもなんでもなく
 https://markshroyer.com/2013/01/debugging-openbsd-via-qemu/
に書かれてます。 
詳しくは
http://openbsd-akita.blogspot.jp/2015/11/export-kvms-image-to-real-machine.html に書いてます


ともかくとして 混乱するといけないので 初心者は この背景が青の部分はよみとばして下さい。


A) まず概観です

openbsdのサポートするアーキテクチャー
は以下です



drwxr-xr-x   2 0  0       1024 Aug 16 10:28   alpha
drwxr-xr-x   2 0  0        512 Aug 16 03:33   amd64
drwxr-xr-x   2 0  0        512 Aug 14 13:10   armish
drwxr-xr-x   2 0  0       1024 Aug 15 10:19   armv7
drwxr-xr-x   2 0  0        512 Aug 16 10:08   hppa
drwxr-xr-x   2 0  0        512 Aug 16 03:35   i386
drwxr-xr-x   2 0  0        512 Aug 16 06:33   landisk
drwxr-xr-x   2 0  0        512 Aug  7 07:43   loongson
drwxr-xr-x   2 0  0        512 Aug 22 07:17   luna88k
drwxr-xr-x   2 0  0        512 Aug 16 08:18   macppc
drwxr-xr-x   2 0  0        512 Aug 12 01:00   octeon

drwxr-xr-x   2 0  0       1024 Aug  7 00:32     sgi
drwxr-xr-x   2 0  0        512 Aug 16 13:56   socppc
drwxr-xr-x   2 0  0        512 Aug 15 06:23    sparc
drwxr-xr-x   2 0  0        512 Aug 16 09:58   sparc64
drwxr-xr-x   2 0  0        512 Aug 16 09:28     vax
drwxr-xr-x   2 0  0        512 Aug 16 08:01   zaurus





そして  
上の全アーキテクチャーにソースは共通です。
これは驚くべきことです。


-rw-r--r--   1 0  0   24847048 Aug 10 13:50 ports.tar.gz  firefoxなどアプリのソース
-rw-r--r--   1 0  0  126534216 Oct 13 19:12 src.tar.gz      根本的ソース
-rw-r--r--   1 0  0  120351877 Aug 10 13:50 xenocara.tar.gz     Xのソース




例えばインストール 時になにがはいってくるかというと

 1 1007  5000   10171090 Oct 20 09:44 bsd シングルプロセサ用のカーネル
 1 1007  5000   10215954 Oct 20 09:44 bsd.mp マルチプロセサの
カーネル
 1 1007  5000    7680667 Oct 20 09:50 bsd.rd    ブートローダー
1 1007  5000   55006525 Oct 20 09:44 base58.tgz ユーザーランド(後述)
-rw-r--r--  1 1007  5000   51727023 Oct 20 09:45 comp58.tgz
コンパイラ
-rw-r--r--  1 1007  5000    2790358 Oct 20 09:45 game58.tgz ゲーム
-rw-r--r--  1 1007  5000    8990754 Oct 20 09:45 man58.tgz マニュアル
-rw-r--r--  1 1007  5000   20926145 Oct 20 10:29 xbase58.tgz  X関係
-rw-r--r--  1 1007  5000   40008468 Oct 20 10:29 xfont58.tgz
  X関係
-rw-r--r--  1 1007  5000   19446067 Oct 20 10:30 xserv58.tgz  X関係
-rw-r--r--  1 1007  5000    4497260 Oct 20 10:30 xshare58.tgz X関係
です。


を頭に入れておいてください。

つまり 全アーキテクチャでソースは共通で 各アーキテクチャを それぞれのコンパイラがうまくコンパイルしてくれるのです。 まったくもって驚嘆すべき構造です。




B)まず最新のソースをつれてくる

# cd /usr
# export CVSROOT=anoncvs@anoncvs3.usa.openbsd.org:/cvs
#  cvs checkout -P src



          cvs -d$CVSROOT checkout -P sys 
      一応通るけど 必要ないらしい    確かに /usr/src/sys/は黄色だけで できていた

Once you have a tree,
you can update it at a later time:
 # cd /usr/src
 # export CVSROOT=anoncvs@anoncvs3.usa.openbsd.org:/cvs
 # cvs -d$CVSROOT up -Pd


http://unosodoku638kam.hatenablog.com/entry/2013/12/27/192223  も参考に

 

C)ソースからカーネルをビルドする。


cp /bsd /bsd-1
とバックアップをとっときます。
立ち上がらないときは /bsd-1で立ち上げます

# cd /usr/src/sys/arch/amd64/conf
# config GENERIC
# cd ../compile/GENERIC
# make clean && make                <ー15分かかった:linuxで遊んでいよう
# make clean && make depend && make   <ー15分かかった:linuxで遊んでいよう
# make install

ls -l /bsd*

インストールが終わったら再起動させます。
# reboot

 

openbsdではこの青背景の部分は またもや無視してください。
kvm hostは archlinux です(もちろん guestはopenbsd)。
archlinuxで topで負荷をみると

top - 00:51:44 up 44 min,  0 users,  load average: 2.61, 2.46, 1.99

Tasks: 112 total,   3 running, 109 sleeping,   0 stopped,   0 zombie
%Cpu0  :   8.9/4.1    13[|||||||                                              ]
%Cpu1  :  90.1/9.3    99[|||||||||||||||||||||||||||||||||||||||||||||||||||||]
GiB Mem : 61.1/1.857   
GiB Swap:  0.0/4.000   

な感じで、swapは発生してません。 意外と軽い。

 

D)ソースからユーザランドbaseをビルド
Linux
ディストリビューションでいうところの
   coreutilsBusyBoxに当たる部分

 

次にカーネル以外の部分を最新にします。
Clear your /usr/obj directory and rebuild symbolic links:
# rm -rf /usr/obj/*
# cd /usr/src
# make obj



  • # cd /usr/src/etc && env DESTDIR=/ make distrib-dirs
    
    
  • Build the system:
    # cd /usr/src

    # make build   <ー2時間ぐらいかかる:おでかけtime
    

 

細かな変更の適用

ビルドが終了したらFollowing -current 」 を確認し
必要な変更を行います。



例えば 2013/12/04 には、 2013/12/08 に libcompat が廃止されたので、 以下のコマンドを実行し、 必要のないファイルを削除するように書かれています。
# rm -f /usr/lib/libcompat.a /usr/lib/libcompat_p.a
# rm -f /usr/include/{re_comp,regexp,sgtty,sys/timeb}.h
# rm -f /usr/share/man/man3/{re_comp,re_exec,rexec,regexp}.3
# rm -f /usr/share/man/man3/{cuserid,ftime,gtty,setrgid,setruid,stty}.3
これ以外にも様々な指示があるので、 よく内容を読んで実行してください。


openbsd do not  security support of X and aplications of ports .
X's security is xorg .
Firefox(a part of ports)  security is  firefox.org .



E) xenocara つまり X




 http://www.openbsd.org/faq/faq5.html#Xbld の通りである

$ cd /usr


cvs -qdanoncvs@anoncvs3.usa.openbsd.org:/cvs checkout -P xenocara

       cvs -qdanoncvs@anoncvs2.usa.openbsd.org:/cvs checkout -P xenocara  でもいいかな

# cd /usr/xenocara

# rm -rf /usr/xobj/*

# make bootstrap

# make obj

# make build




F)portsつまり アプリレベル

firefox等のアプリをそのソースからコンパイル

私はこれはしません。

openbsd本体では 500をこえるpkgをつくるので 
         これには余程はやいコンピューターがいると思われます。

( vlc をmakeしようとすると 10時間立っても終わりません。  
cpu: Intel(R) Celeron(R) CPU J1800 @ 2.41GHz, 2417.11 MHz
では オソーイ. Cleaning for gcc-4.9.3p3が出たのでおそらくgccもコンパイルして遅くなったのだろう )


export PKG_PATH=http://ftp.openbsd.org/pub/OpenBSD/snapshots/packages/amd64
pkg_add firefox
で充分です。
ただし packages にないときはしょうがない。



一応書きます


# cd /usr
# cvs -qd anoncvs@anoncvs.ca.openbsd.org:/cvs get -P ports



Any time afterwards, to update this tree:
If you are following -current:
    # cd /usr/ports
    # cvs -q up -Pd



 make search key=rsnapshot


ここ

「 /etc/mk.conf 」に以下を追加します。
SUDO=/usr/bin/sudo
USE_SYSTRACE=Yes
WRKOBJDIR=/usr/obj/ports
DISTDIR=/usr/distfiles
PACKAGE_REPOSITORY=/usr/packages

アクセス権を修正します。
$ sudo chgrp -R wsrc /usr/ports
$ sudo find /usr/ports -type d -exec chmod g+w {} \;

フォルダを作成します。
$ sudo mkdir /usr/obj/ports
$ sudo mkdir /usr/distfiles
$ sudo mkdir /usr/packages

 

 

  • 検索
    $ cd /usr/ports
    $ make search key=rsnapshot
必要なものが見つかったら、 そのディレクトリに移動し、 以下のコマンドを使用して、 インストールを行います。
  • インストール
    $ sudo make install
  •  
  • フレーバーの表示
    $ make show=FLAVORS
  •  
  • フレーバーの設定してインストール。
    $ sudo env FLAVOR=no_x11 make install
  •  
  • サブパッケージの表示
    $ make show=MULTI_PACKAGES
  •  
  • サブパッケージを指定してインストール
    $ env SUBPACKAGE="-server" make install


15.3.6 - Cleaning up after a port build

You probably want to clean the port's default working directory after you have built the package and installed it.
$ make clean
===>  Cleaning for rsnapshot-1.2.9
In addition, you can also clean the working directories of all dependencies of the port with this make target:
$ make clean=depends
===>  Cleaning for rsync-2.6.9
===>  Cleaning for rsnapshot-1.2.9
If you wish to remove the source distribution set(s) of the port, you would use
$ make clean=dist
===>  Cleaning for rsnapshot-1.2.9
===>  Dist cleaning for rsnapshot-1.2.9
In case you have been compiling multiple flavors of the same port, you can clear the working directories of all these flavors at once using
$ make clean=flavors
You can also clean things up as they get built, by setting a special variable. Work directories will automatically be cleaned after packages have been created:
$ make package BULK=Yes

雑感
QEMUの技術は大事だ!
おそらく i386は おそらくamd64 マルチCPUな 高速コンピュータの上で ソースからコンパイルされている。

というのは openbsdに たとえ古いi386マシンがあったとしても 昔は1G超えのメモリを積むことはあり得なかった。 しかもCPUが i386では1000近いpackageを作ることは恐ろしい時間がかかり耐えられない。






ともかくとして snapshotについていくには
kenel
userland
X
をコンパイルして、


さらに portsの日本語`入力(scim-anthy)はコンパイルしないとうまくいかない。





NHKの神の数式theory of everything) より抜粋

素粒子はすごく軽いので 通常は重力は無視できるので 
微細な世界では標準理論(素粒子の数式)だけでOK
しかし 宇宙の始まりとブラックホールの中では重力が無視できないので標準理論は破綻する。

そのために超弦理論がでてきた。
恐ろしい事に 数学力があれば  超弦理論から 一般相対性理論も 標準理論(素粒子の数式)も 導きだされてしまう。



で superstring theoryが theory of every thing の最有力候補だ。 
superstring theoryは 超微細な世界では 11次元という。
(一本のロープは 人間には前か後かにしか進めない一次元の世界であるが 小さなアリにとっては前後左右に進める2次元の世界だ。 でなんとなく感覚的に微細な世界では 11次元は納得できる)

なお 数学は神の領域で nが3以上なら 神様でもフェルマーの式を満たす数はつくれない。
そして 今 整数論、位相幾何、関数論が相互乗り入れになり 数学の第統一がなされようとしている(フェルマーの定理という整論の問題が 楕円関数で解決された)。

さらにペレルマンがポアンカレ予想をといたときに 物理の概念をたくさんいれている。

で 数学と物理とが融合していっており 大統一論がスタートしてるかのようである。
 でも これらは天才の世界の出来事であり
通常の人間は いくら努力をしても 100m 10秒は切れないように ワカンナイ。

なお
https://www.youtube.com/watch?v=7y_BlA3ZTeQ
の 5分50秒くらいのところに 超弦理論の元は
200年前の 数学者オイラーのオイラーの関数だったとでてます。



2015年10月18日日曜日

boot openbsd in UEFI pc preparing by only OpenBSD

0)i wii install openbsd to USB HDD (sd1).

1) boot PC by openbsd 5.8 snapshot CD.

2) install but Partway

3) when 'Use (W)hole disk .....' appear , push ! and go to shell .

4) fdisk -i -b 960 sd1 
 
 
 
 
 5) exit

6) when # appear ,

newfs_msdos /dev/rsd1i

mount /dev/sd1i  /mnt2

mkdir -p /mnt2/efi/boot

cp /mnt/usr/mdec/BOO* /mnt2/efi/boot

7) reboot PC 
 
 
 
8)the next comes up .

 
 
 
 
 
 
in BIOS
openbsd's sd1i is captured as UEFI Generic Boot
          sd1a             as Maxter 

 
 
 
 
 
 
 
<expieriemnt> 
 
and then 
i install openbsd58 into openbsd area  .
but
snapshot's UEFI cannot boot openbsd58 .
it is natural because of diffrense of virsion .
 



 
 
 

2015年10月15日木曜日

★★★ openbsd 6.1 UEFI

https://en.wikipedia.org/wiki/Treaty_of_Shimonoseki より



  • Article 1: China recognizes definitively the full and complete independence and autonomy of Korea, and, in consequence,
    the
    payment of 
    tribute and the performance of ceremonies and formalities by Korea to China,
    that are in 
    derogation of such independence and autonomy, shall wholly cease for the future.




1) set  legacy on BIOS

2)boot PC by CD (burned with install61.iso)

3)boot PC by USB memory (install61.fs を ddで焼いたもの)














in this state , in put !



and then next command


y



exit



y
なれてる人は ここで G だが 、 初心者は a  















次の 画面のcommand



finish all the install process.
so halt -p & remove CD










on X







UEFI のみの時
dd if=./Downloads/install61.fs  of=/dev/sdb

こうして作ったUSBメモリをCDの代わりに使うが、あとは 一緒

これにて
# df
Filesystem  512-blocks      Used     Avail Capacity  Mounted on
/dev/sd0a    111231348   5741536  99928248     5%    /


# mount /dev/sd0i /mnt


# df
Filesystem  512-blocks      Used     Avail Capacity  Mounted on
/dev/sd0a    111231348   5741536  99928248     5%    /
/dev/sd0i          920       488       432    53%    /mnt


# du /mnt
480     /mnt/efi/boot
488     /mnt/efi
520     /mnt

# ls /mnt/                                                                                          
efi

# ls /mnt/efi/                                                                                      
boot

# ls /mnt/efi/boot/                                                                                 
bootia32.efi  bootx64.efi


# file /mnt/efi/boot/bootx64.efi

/mnt/efi/boot/bootx64.efi: MS-DOS executable PE  for MS Windows




Filesystem  512-blocks      Used     Avail Capacity  Mounted on
/dev/sd0a    111231348   1213112 104456672     1%    /


#top
load averages:  1.07,  1.13,  1.15                                      Uob.my.domain 20:20:23
31 processes: 30 idle, 1 on processor                                                 up  0:55
CPU0 states:  0.0% user,  0.0% nice,  0.0% system,  0.0% interrupt,  100% idle
CPU1 states:  0.0% user,  0.0% nice,  0.0% system,  0.0% interrupt, 99.9% idle
CPU2 states:  0.0% user,  0.0% nice,  0.0% system,  0.0% interrupt,  100% idle
CPU3 states:  0.0% user,  0.0% nice,  0.0% system,  0.0% interrupt, 99.9% idle
Memory: Real: 22M/136M act/tot Free: 7691M Cache: 62M Swap: 0K/2055M


# disklabel -E sd0                                                                            
Label editor (enter '?' for help at any prompt)
> p
OpenBSD area: 1024-117231345; size: 117230321; free: 43
#                size           offset  fstype [fsize bsize   cpg]
  a:        113022272          4209056  4.2BSD   2048 16384 12958 # /
  b:          4208006             1024    swap                    # none
  c:        117231408                0  unused                    
  i:              960               64   MSDOS    

















see also

http://marc.info/?l=openbsd-misc&m=144477058232343&w=2




0) BIOS-> legacy boot

1) boot PC by  CD.

2) install but Partway

3) when 'Use (W)hole disk .....' appear , push ! and go to shell .

4) fdisk -i -b 960 sd0

5) exit

6) when # appear ,

newfs_msdos sd0i

mount /dev/sd0i  /mnt2

mkdir -p /mnt2/efi/boot

cp /mnt/usr/mdec/BOO* /mnt2/efi/boot







UEFI openbsd rEFInd



openbsd lives in sd1 (2GB USB stick memory)
and
in bios , boot order is usb -> harddisk . 

my pc has mint-linux in hard disk .
so ubuntu automatically apear.

openbsd logo mark is on.
happy for openbsd fellows








on linux


du EFI/
240    EFI/BOOT/OLD
312    EFI/BOOT/drivers_x64
56     EFI/BOOT/tools_x64
800    EFI/BOOT/icons
1776   EFI/BOOT
1784   EFI/


/dev/sdc1         524008      1784    522224   1% /mnt/sdc1
(USB is /dev/sdc)



file EFI/BOOT/bootx64-openbsd.efi
EFI/BOOT/bootx64-openbsd.efi: PE32+ executable (EFI application) x86-64 (stripped to external PDB), for MS Windows


 
 /root/comment-out.bat EFI/BOOT/refind.conf 
timeout 20
menuentry Linux {
 icon EFI/refind/icons/os_linux.png
 volume KERNELS
 loader bzImage-3.3.0-rc7
 initrd initrd-3.3.0.img
 options "ro root=UUID=5f96cafa-e0a7-4057-b18f-fa709db5b837"
 disabled
}
menuentry Ubuntu {
 loader /EFI/ubuntu/grubx64.efi
 icon /EFI/refined/icons/os_linux.png
 disabled
}
menuentry "ELILO" {
 loader \EFI\elilo\elilo.efi
 disabled
}
menuentry "Windows 7" {
 loader \EFI\Microsoft\Boot\bootmgfw.efi
 disabled
}
menuentry "Windows via shell script" {
 icon \EFI\refind\icons\os_win.png
 loader \EFI\tools\shell.efi
 options "fs0:\EFI\tools\launch_windows.nsh"
 disabled
}
menuentry "My Mac OS X" {
 icon \EFI\refind\icons\os_mac.png
 volume "OS X boot"
 loader \System\Library\CoreServices\boot.efi
 disabled
}
menuentry "OpenBSD/amd64 snapshots58" {
    loader \EFI\Boot\bootx64-openbsd.efi
    icon \EFI\Boot\icons\os_openbsd.png
}



---------------------------------
ls -l  EFI/BOOT/
total 392
drwxr-xr-x 2 root root   8192 10月 14 23:45 OLD
-rwxr-xr-x 1 root root 120832 10月 14 23:54 bootx64-openbsd.efi
-rwxr-xr-x 1 root root 201416  7月  6  2014 bootx64.efi
drwxr-xr-x 2 root root   8192  7月  6  2014 drivers_x64
drwxr-xr-x 2 root root   8192  7月  6  2014 icons
-rwxr-xr-x 1 root root  15477 10月 14 23:52 os_openbsd.png
-rwxr-xr-x 1 root root  21822 10月 14 23:55 refind.conf
drwxr-xr-x 2 root root   8192  7月  6  2014 tools_x64

i think blue bold letters is necessary.
 
some of the others is also  necessary.
trial reveal it .


http://openbsd-akita.blogspot.jp/2015/10/openbsd-uefi_15.html
is the easy method to install to hard disk . 




https://www.youtube.com/watch?v=bqmWOSV--mE&spfreload=10


Korean soldier when the Vietnam War was added to the sexual assault 
against Vietnamese women .
But there is no apology from South Korea to Vietnam for this thing.
 https://en.wikipedia.org/wiki/Phong_Nh%E1%BB%8B_and_Phong_Nh%E1%BA%A5t_massacre
 
 
 
https://www.youtube.com/watch?v=2oLmlYSJEy0
The term Lai Dai Han is a Vietnamese term for a mixed ancestry person 
born to a South Korean father 
and 
a Vietnamese mother (including the victims of Korean soldiers) 
during the Vietnam War
 
 Lai Dai Han often live at the margins of Vietnamese society. 
The South Korean government has not released an official statement 
regarding the sexual violence that took place during the Vietnam W
ar.




2015年10月14日水曜日

openbsd & UEFI



install openbsd into  USB harddisk . 
 
 
 
1) boot linux  fdisk /dev/sdb

fdisk -l /dev/sdb
Device     Boot   Start     End Sectors  Size Id Type
/dev/sdb1          2048 1050623 1048576  512M  b W95 FAT32 <-----
/dev/sdb4       1050624 3915775 2865152  1.4G a6 OpenBSD

mkfs.vfat /dev/sdb1 <----


2)boot PC by openbsd CD op  install58(amd64 snapshots)
install openbsd by ordinal procedure .

when [make dev] ends , # appers .

then
mount /dev/sd1i /mnt2
mkdir -p /mnt2/efi/boot
cp /mnt/usr/mdec/BOOT* /mnt2/efi/boot




boot by CD





















very important process 
mount /dev/sda1 /mnt2--->needless command, only my mis-typing



power on PC , and push F1 
set EFI





UEFI boot, look display


nomarl openbsd boot state



http://openbsd-akita.blogspot.jp/2015/10/openbsd-uefi_15.html
is the easy method to install to hard disk . 


https://www.youtube.com/watch?v=bqmWOSV--mE&spfreload=10



Korean soldier when the Vietnam War was added to the sexual assault 
against Vietnamese women .
But there is no apology from South Korea to Vietnam for this thing.
https://en.wikipedia.org/wiki/Phong_Nh%E1%BB%8B_and_Phong_Nh%E1%BA%A5t_massacre
 
 
https://www.youtube.com/watch?v=2oLmlYSJEy0
The term Lai Dai Han is a Vietnamese term for a mixed ancestry person 
born to a South Korean father 
and 
a Vietnamese mother (including the victims of Korean soldiers) 
during the Vietnam War
 
 Lai Dai Han often live at the margins of Vietnamese society. 
The South Korean government has not released an official statement 
regarding the sexual violence that took place during the Vietnam War.






































































2015年10月3日土曜日

bridge 1)3枚のNIC+dfhcp+pf

1)まずは


internet
|
run0
openbsd
fxp0 fxp1 em0

と openbsd に


一枚のwifi:  run0
三枚のNIC: fxp0 fxp1 em0
の場合です。



                                                             
$ cat /etc/hostname.fxp0                                                      
up



$ cat /etc/hostname.fxp1
up



$ cat /etc/hostname.em0                                                       
up



して

# cat /etc/hostname.vether0                                                   
inet 192.168.1.1 255.255.255.0 192.168.1.255
up




して



# cat /etc/hostname.bridge0                                                   
add vether0
add fxp0
add fxp1
add em0
up

します。




すると DHCPDサーバーは



$ cat /etc/dhcpd.interface                                                    
vether0


$ cat /etc/dhcpd.conf                                                         
  option  domain-name-servers 8.8.8.8;

  subnet 192.168.1.0 netmask 255.255.255.0 {
        option routers 192.168.1.1;
        filename "pxelinux.0";     
        range 192.168.1.32 192.168.1.127;
        }


pfつまりfirewallは




# cat /etc/pf.conf

    ext_if="run0"
    int_if="vether0"

tcp_services="{ 22, 80, 143, 587 }"  # submisson port
icmp_types="echoreq"
set block-policy return
set loginterface $ext_if
set skip on lo
match out on $ext_if inet from !($ext_if:network) to any nat-to ($ext_if:0)
set reassemble yes no-df
block in log
pass out quick
antispoof quick for { lo $int_if }
pass in  on  $ext_if   inet proto tcp from any to  ( $ext_if:0 ) port $tcp_services
pass in inet proto icmp all icmp-type $icmp_types
pass in on $int_if



です。



以上にて ifconfigは 以下です -a                                                                                                          
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 32768
        priority: 0
        groups: lo
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5
        inet6 ::1 prefixlen 128
        inet 127.0.0.1 netmask 0xff000000


em0: flags=8b43<UP,BROADCAST,RUNNING,PROMISC,ALLMULTI,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:e0:81:2a:bd:0f
        priority: 0
        media: Ethernet autoselect (none)
        status: no carrier
fxp0: flags=8b43<UP,BROADCAST,RUNNING,PROMISC,ALLMULTI,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:a0:c9:6d:3f:83
        priority: 0
        media: Ethernet autoselect (100baseTX full-duplex)
        status: active
fxp1: flags=8b43<UP,BROADCAST,RUNNING,PROMISC,ALLMULTI,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:a0:c9:27:dc:91
        priority: 0
        media: Ethernet autoselect (none)
        status: no carrier


enc0: flags=0<>
        priority: 0
        groups: enc
        status: active

run0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        lladdr dc:fb:02:58:a7:cd
        priority: 4
        groups: wlan egress
        media: IEEE802.11 autoselect (DS1 mode 11g)
        status: active
        ieee80211: nwid URoad-662EA0 chan 2 bssid 00:1d:93:66:2e:a0 41dBm wpakey 0x80d48807c087a4cacbbc320ae43060ea4968c557eb3617f79938b64814467a82 wpaprotos wpa1,wpa2 wpaakms psk wpaciphers tkip,ccmp wpagroupcipher tkip
        inet 192.168.100.101 netmask 0xffffff00 broadcast 192.168.100.255


vether0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
        lladdr fe:e1:ba:d0:49:8f
        priority: 0
        groups: vether
        media: Ethernet autoselect
        status: active
        inet 192.168.1.1 netmask 0xffffff00 broadcast 192.168.1.255


bridge0: flags=41<UP,RUNNING>
        groups: bridge
        priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp
        vether0 flags=3<LEARNING,DISCOVER>
                port 7 ifpriority 0 ifcost 0
        fxp0 flags=3<LEARNING,DISCOVER>
                port 2 ifpriority 0 ifcost 0
        fxp1 flags=3<LEARNING,DISCOVER>
                port 3 ifpriority 0 ifcost 0
        em0 flags=3<LEARNING,DISCOVER>
                port 1 ifpriority 0 ifcost 0


pflog0: flags=141<UP,RUNNING,PROMISC> mtu 33144
        priority: 0
        groups: pflog