Difference between revisions of "Bridge Firewall Linux"
From MS Computech
Line 22: | Line 22: | ||
</pre> | </pre> | ||
− | Enable kernel 4.9 bridge filter | + | Enable kernel 4.9 bridge filter หากไม่ทำการโหลดโมดูล Bridge จะเป็นแค่ Layer 2 Switch ไม่สามารถ Filter ข้อมูลได้ |
<pre> | <pre> | ||
modprobe br_netfilter | modprobe br_netfilter |
Revision as of 19:26, 16 March 2019
Bridge Firewall Linux
ผมใช้วิธีนี้ติดตั้งบน Debian etch.
# apt-get install bridge-utils
นำConfig ทั้งหมดไส่ใน /etc/rc.local
nano /etc/rc.local
# Bridge Interface ifconfig eth0 down ifconfig eth1 down brctl addbr br0 brctl addif br0 eth0 brctl addif br0 eth1 brctl stp br0 on ifconfig eth0 0.0.0.0 up ifconfig eth1 0.0.0.0 up ifconfig br0 192.168.1.107 netmask 255.255.255.0 up route add default gw 192.168.1.1
Enable kernel 4.9 bridge filter หากไม่ทำการโหลดโมดูล Bridge จะเป็นแค่ Layer 2 Switch ไม่สามารถ Filter ข้อมูลได้
modprobe br_netfilter depmod -a echo 1 > /proc/sys/net/ipv4/ip_forward