一,下载FreeBSD并制作U盘操作系统
dd if=FreeBSD-8.2-RELEASE-i386-memstick.img of=/dev/sdb bs=10240 conv=sync
二,安装FreeBSD
二,安装FreeBSD
请参考 http://www.panabit.com/free2/freebsd_setup.html
三,安装Panabit
安装日志如下:
Panabit# tar zxvf Panabit_1109_fb8x.tar.gz
x Panabit_1109_fb8x/
x Panabit_1109_fb8x/admin/
x Panabit_1109_fb8x/bin/
......
x Panabit_1109_fb8x/
x Panabit_1109_fb8x/admin/
x Panabit_1109_fb8x/bin/
......
......
......
x Panabit_1109_fb8x/admin/cgi-bin/Setup/dns_listrule
x Panabit_1109_fb8x/admin/cgi-bin/Setup/dns_addrule
x Panabit_1109_fb8x/admin/cgi-bin/Setup/dns_setrule
Panabit# ls
.cshrc .profile
.k5login Panabit_1109_fb8x
.login Panabit_1109_fb8x.tar.gz
Panabit# cd Panabit_1109_fb8x
Panabit# ls
admin etc kernel
bin ipeinstall rdf
Panabit# ./ipeinstall
x Panabit_1109_fb8x/admin/cgi-bin/Setup/dns_addrule
x Panabit_1109_fb8x/admin/cgi-bin/Setup/dns_setrule
Panabit# ls
.cshrc .profile
.k5login Panabit_1109_fb8x
.login Panabit_1109_fb8x.tar.gz
Panabit# cd Panabit_1109_fb8x
Panabit# ls
admin etc kernel
bin ipeinstall rdf
Panabit# ./ipeinstall
Welcome installing panabit!
Please input the directory to install panabit [/usr/panabit]:
Please input the directory to store log [/usr/panalog]:
Please input the directory to store configuration [/usr/panaetc]:
Please input the directory to store log [/usr/panalog]:
Please input the directory to store configuration [/usr/panaetc]:
The last time to verify your choice:
(1) The directory that you want to install is "/usr/panabit"
(2) The directory that the log to be stored is "/usr/panalog"
(3) The directory that the configuration to be stored is "/usr/panaetc"
Above are right(y/n[y])?y
(1) The directory that you want to install is "/usr/panabit"
(2) The directory that the log to be stored is "/usr/panalog"
(3) The directory that the configuration to be stored is "/usr/panaetc"
Above are right(y/n[y])?y
Creating directory "/usr/panabit" ...ok
Creating directory "/usr/panalog" ...ok
Creating directory "/usr/panalog" ...ok
Installing Panabit to "/usr/panabit" ...ok
Initializing configurations ...ok
Saving configuration to /etc/PG.conf ...
****** Congratulations ******!
You have successfully installed Panabit on your system:
(1) The installed path is: /usr/panabit
(2) The log path is: /usr/panalog
(3) The configuration path is: /usr/panaetc
Saving configuration to /etc/PG.conf ...
****** Congratulations ******!
You have successfully installed Panabit on your system:
(1) The installed path is: /usr/panabit
(2) The log path is: /usr/panalog
(3) The configuration path is: /usr/panaetc
To make your system more sutiable for panabit running, it's
recomended of tuning your system according your system memory
size and cpu frequence.
Do you want to tune your system(y/n)[y]: y
[: 8: unexpected operator
Your kernel configuration has been tuned as the followings:
recomended of tuning your system according your system memory
size and cpu frequence.
Do you want to tune your system(y/n)[y]: y
[: 8: unexpected operator
Your kernel configuration has been tuned as the followings:
vm.pmap.pg_ps_enabled=1
kern.ipc.nmbclusters=10240
kern.hz=1000
kern.ipc.nmbclusters=10240
kern.hz=1000
You should restart your system to make they take effects.
Following interfaces are installed in your system:
em0 em1 em2
em0 em1 em2
Please choose one of above as your admin interface: em0
Please input ip address of admin interface: 172.16.2.211
Please input network mask of admin interface: 255.255.255.0
Please input default gateway: 172.16.2.1
Please input ip address of admin interface: 172.16.2.211
Please input network mask of admin interface: 255.255.255.0
Please input default gateway: 172.16.2.1
The following interfaces are left for your data processing:
em1 em2
Please select data interfaces: em1 em2
em1 em2
Please select data interfaces: em1 em2
Your interface configurations are:
Admin interface : em0
Admin ip address : 172.16.2.211
Admin netmask : 255.255.255.0
Default gateway : 172.16.2.1
Data interfaces : em1 em2
Thank you for using panabit!
You can issue "/usr/panabit/bin/ipectrl start" to start panabit!
And you can also add the above command to /etc/rc.local file
to let the system automaticly start panabit at system startup!
If you want to stop the currently running panabit, you can issue
"/usr/panabit/bin/ipectrl stop" to stop it!
Panabit#
Panabit# /usr/panabit/bin/ipectrl start
kern.jos.ipe_netdevices: -> em1 em2
net.inet.tcp.msl: 30000 -> 2000
cpu frequence: 2410407059
Load module "pci" ......
data ports: em1 em2
em1@bus2:5:0: 0x8086:0x100f
em2@bus2:6:0: 0x8086:0x100f
Load module "thread" ......
Load module "cmds" ......
Load module "dma" ......
This is standard version, no PANAOS DMA supported!
Load module "mgmt" ......
Load module "mbuf" ......
Load module "intf" ......
Load module "bsd" ......
interface em1 attached, mac address 00:0C:29:96:FD:6C
bring interface em1 up
interface em2 attached, mac address 00:0C:29:96:FD:76
bring interface em2 up
Load module "ipe" ......
Load module "axpdef" ......
Load module "watcher" ......
Load module "tbucket" ......
Load module "key" ......
Load module "keytable" ......
Load module "flow" ......
Set default gateway to 172.16.2.1
Load module "node" ......
network is started!
Load module "xping" ......
Load module "port" ......
port module initialzied, max port 65536
Starting ipe_httpd ......
Load module "axpgrp" ......
Load module "dpi" ......
Load module "protocol" ......
Load module "appobj" ......
Load module "localip" ......
Load module "iptable" ......
Load module "vlink" ......
Load module "nat" ......
Load module "policy_scheduler" ......
Load module "pre-config" ......
Load module "logger" ......
Load module "flow" ......
Load module "config" ......
ipe_httpd is started!
Load module "josdbf" ......
ipe_monitor is started!
panaos startup!
/usr/panabit/bin/ipe_httpd: started as root without requesting chroot(), warning only
data monitor is started!
logger is running ......
Load module "axpdesc" ......
flow is running ......
Load module "cmds" ......
xping is running ......
Load module "dbf" ......
Load module "cmds" ......
dbf_minit: logpath is '/usr/panalog', internal is 360
Load module "thread" ......
dbf_load: log file not exist!
Load module "stat" ......
Load module "chart" ......
Load module "logger" ......
thr_stat_0 is running ......
thr_stat_1 is running ......
logger is running ......
"/usr/panabit/bin/ipectrl stop" to stop it!
Panabit#
Panabit# /usr/panabit/bin/ipectrl start
kern.jos.ipe_netdevices: -> em1 em2
net.inet.tcp.msl: 30000 -> 2000
cpu frequence: 2410407059
Load module "pci" ......
data ports: em1 em2
em1@bus2:5:0: 0x8086:0x100f
em2@bus2:6:0: 0x8086:0x100f
Load module "thread" ......
Load module "cmds" ......
Load module "dma" ......
This is standard version, no PANAOS DMA supported!
Load module "mgmt" ......
Load module "mbuf" ......
Load module "intf" ......
Load module "bsd" ......
interface em1 attached, mac address 00:0C:29:96:FD:6C
bring interface em1 up
interface em2 attached, mac address 00:0C:29:96:FD:76
bring interface em2 up
Load module "ipe" ......
Load module "axpdef" ......
Load module "watcher" ......
Load module "tbucket" ......
Load module "key" ......
Load module "keytable" ......
Load module "flow" ......
Set default gateway to 172.16.2.1
Load module "node" ......
network is started!
Load module "xping" ......
Load module "port" ......
port module initialzied, max port 65536
Starting ipe_httpd ......
Load module "axpgrp" ......
Load module "dpi" ......
Load module "protocol" ......
Load module "appobj" ......
Load module "localip" ......
Load module "iptable" ......
Load module "vlink" ......
Load module "nat" ......
Load module "policy_scheduler" ......
Load module "pre-config" ......
Load module "logger" ......
Load module "flow" ......
Load module "config" ......
ipe_httpd is started!
Load module "josdbf" ......
ipe_monitor is started!
panaos startup!
/usr/panabit/bin/ipe_httpd: started as root without requesting chroot(), warning only
data monitor is started!
logger is running ......
Load module "axpdesc" ......
flow is running ......
Load module "cmds" ......
xping is running ......
Load module "dbf" ......
Load module "cmds" ......
dbf_minit: logpath is '/usr/panalog', internal is 360
Load module "thread" ......
dbf_load: log file not exist!
Load module "stat" ......
Load module "chart" ......
Load module "logger" ......
thr_stat_0 is running ......
thr_stat_1 is running ......
logger is running ......
四,简单配置Panabit
1,网络
2,策略
3,流量图
五,安装Samba文件服务器
下载安装配置
# fetch http://us3.samba.org/samba/ftp/old-versions/samba-3.0.25.tar.gz
# tar zxvf samba-3.0.25.tar.gz
# cd samba-3.0.25/source/
# ./configure && make && make install
# cd ../examples
# cp smb.conf.default /usr/local/samba/lib/smb.conf
# tar zxvf samba-3.0.25.tar.gz
# cd samba-3.0.25/source/
# ./configure && make && make install
# cd ../examples
# cp smb.conf.default /usr/local/samba/lib/smb.conf
Panabit# tail -n 5 /usr/local/samba/lib/smb.conf
[gongxiang]
path = /usr/gongxiang
public = yes
only guest = yes
writable = no
启动服务
# /usr/local/samba/sbin/nmbd -D
# /usr/local/samba/sbin/smbd -D
六,DNS缓存服务器
1,Panabit# cat /etc/namedb/named.conf
options {
directory "/etc/namedb/working";
pid-file "/var/run/named/pid";
dump-file "/var/dump/named_dump.db";
statistics-file "/var/stats/named.stats";
};
zone "." { type hint; file "/etc/namedb/named.root"; };
zone "127.in-addr.arpa" { type master; file "/etc/namedb/master/localhost-reverse.db"; };
2,Panabit# cat /etc/resolv.conf
nameserver 127.0.0.1
3,Panabit# cat /etc/rc.conf
# Created: Sat Nov 5 11:31:25 2011
# Enable network daemons for user convenience.
# Please make all changes to this file, not to /etc/defaults/rc.conf.
# This file now contains just the overrides from /etc/defaults/rc.conf.
hostname="Panabit"
sshd_enable="YES"
ifconfig_="inet 172.16.2.5 netmask 255.255.255.0"
ifconfig_nfe0="inet
七,开机自动启动
[gongxiang]
path = /usr/gongxiang
public = yes
only guest = yes
writable = no
启动服务
# /usr/local/samba/sbin/nmbd -D
# /usr/local/samba/sbin/smbd -D
六,DNS缓存服务器
1,Panabit# cat /etc/namedb/named.conf
options {
directory "/etc/namedb/working";
pid-file "/var/run/named/pid";
dump-file "/var/dump/named_dump.db";
statistics-file "/var/stats/named.stats";
};
zone "." { type hint; file "/etc/namedb/named.root"; };
zone "127.in-addr.arpa" { type master; file "/etc/namedb/master/localhost-reverse.db"; };
2,Panabit# cat /etc/resolv.conf
nameserver 127.0.0.1
3,Panabit# cat /etc/rc.conf
# Created: Sat Nov 5 11:31:25 2011
# Enable network daemons for user convenience.
# Please make all changes to this file, not to /etc/defaults/rc.conf.
# This file now contains just the overrides from /etc/defaults/rc.conf.
hostname="Panabit"
sshd_enable="YES"
ifconfig_="inet 172.16.2.5 netmask 255.255.255.0"
ifconfig_nfe0="inet
Panabit# tail /etc/rc.local
/usr/panabit/bin/ipectrl start
/usr/local/samba/sbin/nmbd -D
/usr/local/samba/sbin/smbd -D
/usr/panabit/bin/ipectrl start
/usr/local/samba/sbin/nmbd -D
/usr/local/samba/sbin/smbd -D