2012年1月20日 星期五

[Samba] ReadySHARE

ReadySHARE:
To browser the file directories via Smaba.
file directory: \\readyshare\USB_Storage
Using WINS protocol to reverse NetBIOS name(readyshare) to IP address.

1. The WINS protocol is handled by nmbd, therefore nmbd has to be run in background.

2. smb.conf
[global]
domain master = yes
local master = yes
preferred master = yes
os level = 65

http://www2.meps.tp.edu.tw/documents/memo/samba/samba.htm
http://samlee.idv.tw/linux/samba/samba05/samba05.htm

2012年1月1日 星期日

[Linux] Samba support file > 2GB

The most important build option to support large file is with --enable-largefile=y.

./configure --host=x86_64 --build=mips-linux --target=mips-linux SMB_BUILD_CC_NEGATIVE_ENUM_VALUES=1 --enable-largefile=y --prefix=$(TOOLCHAIN)/usr --disable-cups --disable-pie --disable-fam --enable-shared --disable-static --with-configdir=/etc/samba --with-logfilebase=/var/log/samba --with-winbind --without-quotas --without-ldap --without-ads --with-sendfile-support --without-krb5 --without-pam --without-pam_smbpass --disable-iprint --without-fhs --without-libsmbclient --without-python

[Linux] Proftpd

proftpd -c /var/proftpd.conf -S 192.168.0.100 &


proftpd-1.3.4a
./configure --host=mips --prefix=$(TOOLCHAIN)/usr --enable-nls --with-libraries=$(TOOLCHAIN)/usr/lib --with-includes=$(TOOLCHAIN)/usr/include ac_cv_lib_iconv_iconv_open=yes ac_cv_lib_intl_bindtextdomain=yes


libiconv-1.14
./configure --host=mips-linux --prefix=$(TOOLCHAIN)/usr --enable-nls --with-libraries=$(TOOLCHAIN)/usr/lib --enable-shared

gettext-0.18.1.1
./configure --host=mips --prefix=$(TOOLCHAIN) --includedir=$(TOOLCHAIN)/include --libdir=$(TOOLCHAIN_TOP)/lib --with-libraries=$(TOOLCHAIN)/lib --enable-nls HAVE_POSIX_SPAWN=1

2011年12月14日 星期三

[Router] DMZ

iptables -t nat -A PREROUTING -i ppp0 -p all -j DNAT --to-destination 192.168.0.100

[Router] NAT

# Flush NAT table rules
  iptables -F -t nat
  iptables -X -t nat
  iptables -Z -t nat
  iptables -t nat -P PREROUTING  ACCEPT
  iptables -t nat -P POSTROUTING ACCEPT
  iptables -t nat -P OUTPUT      ACCEPT

# Accept eth0 for all resources
iptables -A INPUT -i eth0 -j ACCEPT

# Enable router function
echo "1" > /proc/sys/net/ipv4/ip_forward

# Enable NAT function
iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o ppp0 -j MASQUERADE