Setting up a small business firewall with IP filter

Source: Internet
Author: User
Tags filter firewall

First, the network environment

1, Host A: Install freebsd4.7, install three network card fxp0, Xl0 and XL1.

Fxp0 for external network card, ip:x.x.x.x ISP to provide me with IP address

Xl0 for internal public area network card, ip:192.168.0.1

XL1 provides regional network adapters for internal services, ip:192.168.80.1

2, Host B: external to provide WWW service host, IP address: 192.168.80.80

3, Host C: the external provision of FTP service host, ip:192.168.80.3.

4, other workstations n Taiwan.

Second, compile the kernel

1,

#cd /sys/i386/conf
#cp GENERIC kernel_IPF

2, compile kernel_ipf, add the option:

options IPFILTER
options IPFILTER_LOG
options IPFILTER_DEFAULT_BLOCK
3、
<CENTER><ccid_nobr>
<table width="400" border="1" cellspacing="0" cellpadding="2"
bordercolorlight = "black" bordercolordark = "#FFFFFF" align="center">
<tr>
  <td bgcolor="e6e6e6" class="code" style="font-size:9pt">
  <pre><ccid_code>
#/usr/sbin/config kernel_IPF
#cd ../../compile/kernel_IPF
#make kepend
#make
#make install

4, edit/etc/rc.rc.conf, open the following options:

defaultrouter="x.x.x.1" x.x.x.1为ISP提供的网关
gateway_enable="YES"
ipfilter_enable="YES"
ipnat_enable="YES"

5. Reboot system: Reboot

Third, configure the firewall

1, set address conversion ipnat. Under/etc, create a new file Ipnat.rules, which reads:



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.