[global]
workgroup = xxxx
server string = xxxx
netbios name = xxxx
security = user
passdb backend = tdbsam
#dos charset = CP932
unix charset = UTF-8
wins support = Yes
load printers = No
disable spoolss = Yes
client min protocol = core
hosts allow = 192.168.xxx.0/24 127.
winbind use default domain = Yes
encrypt passwords = Yes
[homes]
comment = Home Directories
valid users = %S, %D%w%S
browseable = Yes
read only = No
inherit acls = Yes
map to guest = bad user
[Share]
comment = Share Folder for All Users
path = /export/home/samba/
browsable = Yes
read only = no
と極簡単なもの。samba の固有の設定(パスワードとか)は
ご自分でお調べください。いくらでもネットに転がっていますので。
ここいらまでは情報も多いがFirewallともなるときつい。
openindiana では ipfilter を使うので、私のサンプルを
# ループバックの許可
pass out quick on lo0
pass in quick on lo0
# ICMP
#pass out log quick on e1000g0 proto icmp all
#pass in log quick on e1000g0 proto icmp all
pass out quick on e1000g0 proto tcp/udp from any to any port = 993 keep state
pass out quick on e1000g0 proto tcp/udp from any to any port = 465 keep state
pass out quick on e1000g0 proto tcp/udp from any to any port = 587 keep state
pass out quick on e1000g0 proto tcp/udp from any to any port = 8080 keep state
pass out quick on e1000g0 proto tcp/udp from any to any port = 9100 keep state
pass out quick on e1000g0 proto tcp/udp from any to any port = 53 keep state
pass out quick on e1000g0 proto tcp/udp from any to any port = 80 keep state
pass out quick on e1000g0 proto tcp/udp from any to any port = 443 keep state
pass out quick on e1000g0 proto tcp/udp from any to any port = 515 keep state
# ICMP
pass out quick on e1000g0 proto icmp from any to any keep state
# Allow [Samba or CIFS(netbios 137-139,445)]
pass out quick on e1000g0 proto udp from any to 192.168.115.15 port = 137 keep state
pass out quick on e1000g0 proto udp from any to 192.168.115.15 port = 138 keep state
pass out quick on e1000g0 proto tcp/udp from any to 192.168.115.0/28 port = 137 keep state
pass out quick on e1000g0 proto tcp/udp from any to 192.168.115.0/28 port = 138 keep state
pass out quick on e1000g0 proto tcp/udp from any to 192.168.115.0/28 port = 139 keep state
pass out quick on e1000g0 proto tcp/udp from any to 192.168.115.0/28 port = 445 keep state
pass out quick on e1000g0 proto tcp/udp from any to any port 32768 >< 65535
# 出力パケット:その他全拒否
block out log quick on e1000g0 proto tcp/udp all
block out log quick on e1000g0 proto icmp all
# ICMP
pass in quick on e1000g0 proto icmp from any to any keep state
# Allow [Samba or CIFS(netbios 137-139,445)]
pass in quick on e1000g0 proto udp from 192.168.115.15 to any port = 137 keep state
pass in quick on e1000g0 proto udp from 192.168.115.15 to any port = 138 keep state
pass in quick on e1000g0 proto tcp/udp from 192.168.115.0/28 to any port = 137 keep state
pass in quick on e1000g0 proto tcp/udp from 192.168.115.0/28 to any port = 138 keep state
pass in quick on e1000g0 proto tcp/udp from 192.168.115.0/28 to any port = 139 keep state
pass in quick on e1000g0 proto tcp/udp from 192.168.115.0/28 to any port = 445 keep state
pass in quick on e1000g0 proto tcp/udp from any to any port 32768 >< 65535
block in log quick on e1000g0 from 0.0.0.0/32 to any
block in log quick on e1000g0 from 127.0.0.0/8 to any
block in log quick on e1000g0 from 10.0.0.0/8 to any
block in log quick on e1000g0 from 169.254.0.0/16 to any
block in log quick on e1000g0 from 172.16.0.0/12 to any
block in log quick on e1000g0 from 192.168.0.0/16 to any
block in log quick on e1000g0 all with opt lsrr
block in log quick on e1000g0 all with opt ssrr
block in log quick from any to any with ipopts
block in log quick on e1000g0 proto tcp all with short
# 全入力出力パケットの拒否
block out log on e1000g0 all
block in log on e1000g0 all