瀏覽模式: 普通 | 列表

iptables + 配對 MAC網卡卡號限制內部對外連線

使用 iptables中的 -m mac --mac-source參數,能使用 -m mac的 chain只有 INPUT、PREROUTING、FORWARD

在所有 tables上作限制皆有效用,但方便管理的話就統一用以下設定的吧

   iptables -t filter -A FORWARD -m mac --mac-source 00:13:d3:a9:fc:ff -j DROP

等於

   iptables -A FORWARD -m mac --mac-source 00:13:d3:a9:fc:ff -j DROP

標籤: iptables

iptables + Layer7 filter

fedora core4

[1.]
cd /usr/src/kernels
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.15.3.tar.bz2
wget http://nchc.dl.sourceforge.net/sourceforge/l7-filter/netfilter-layer7-v2.1.tar.gz
wget http://nchc.dl.sourceforge.net/sourceforge/l7-filter/l7-protocols-2006-01-22.tar.gz
wget ftp://ftp.netfilter.org/pub/iptables/iptables-1.3.5.tar.bz2

[2.]
tar jxvf linux-2.6.15.3.tar.bz2
tar zxvf netfilter-layer7-v2.1.tar.gz
cp netfilter-layer7-v2.1/kernel-2.6.13-2.6.15-layer7-2.1.patch linux-2.6.15.3/
cd linux-2.6.15.3/
patch -p1 < kernel-2.6.13-2.6.15-layer7-2.1.patch

make menuconfig

Networking --->
    Networking options --->

[閱讀全文]

標籤: iptables

iptables流呈圖

iproute2

EX1

echo "200 cross" >> /etc/iproute2/rt_tables
ip rule add from [來源ip] table cross
ip route add default via [對外ip] dev eth0 table cross
ip route flush cache



EX2

 --------
 |        |+ 1.1.1.1/24 --- 1.1.1.1.254 ----->
 |        |                                                     [ Internet ]
 |        |+ 2.2.2.2/24 --- 2.2.2.2.254 ----->
 --------


ip addr add 1.1.1.1/24 dev eth0
ip addr add 2.2.2.2/24 dev eth0

ip rule add from 1.1.1.1 lookup 201

[閱讀全文]

Quote:

ISPConfig 一般要管理虛擬主機的軟體如cpanel是商用版的軟體,而ISPConfig是 open source。ISPConfig可以幫助你設定及管理多個domains的網站、e-mail、FTP server及MySQL資料庫。
From techtonic “Build your own ISP with ISPConfig“ http://www.tectonic.co.za/view.php?src=rss&id=894

CentOS 4.3 最小安裝

相關套件安裝

rpm --import /usr/share/rhn/RPM-GPG-KEY*

yum update


yum install -y fetchmail wget bzip2 unzip zip nmap openssl lynx fileutils ncftp
yum install -y bind bind-chroot
yum install -y mysql mysql-devel mysql-server

[閱讀全文]

RavenCore Hosting Control panel - web-based control panel

 

Fedora core 4 ( mini install )

 

[1.] 安裝所需套件

yum install httpd php mysql-server mod_ssl openssl postfix dovecot vsftpd spamassassin bind

yum install php-imap php-mysql amavisd-new clamav clamav-update

 

[2.]
wget http://nchc.dl.sourceforge.net/sourceforge/ravencore/ravencore-0.2.3-1.noarch.rpm

 

rpm -ivh ravencore-0.2.3-1.noarch.rpm

 

/etc/init.d/ravencore start

 

[3.] 設定密碼給帳號admin

/usr/local/ravencore/sbin/run_cmd passwd

 

[4.] view http://hostname_ip:8000/

FTP + Pure-FTPd

[1]. 安裝套件 install pure-ftpd.xx.rpm

[2]. 啟動 /etc/init.d/pure-ftpd start

[3]. 測試 telnet localhost 21
220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 2 of 50 allowed.
220-Local time is now 15:03. Server port: 21.
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 15 minutes of inactivity.
[4]. pure-ftpd設定檔 vi /etc/pure-ftpd/pure-ftpd.conf
# 不允許匿名

[閱讀全文]

標籤: ftp