"Go home for help" BSD5 Nic Bridging for package filtering Firewall

Source: Internet
Author: User
"Go home for help" BSD5 Nic bridging to filter firewall-Linux Enterprise Application-Linux server application information. The following is a detailed description. If you want to use ipfw to configure a transparent proxy for five NICs, how can you configure the rules?

The two are connected to the server and the Intranet, and the bsd is configured with ipfw. The other two are connected to China Telecom and China Netcom respectively ...........
Added in the kernel

Options BRIDGE
Options IPFIREWALL
Options DUMMYNET
Options IPFIREWALL_VERBOSE
Options IPFIREWALL_VERBOSE_LIMIT = 30
Options IPFIREWALL_DEFAULT_TO_ACCEPT

Re-compiled,
Rc. The conf file is configured.
The rule does not work after customization. How can I write the rule? on bsd, only ip addresses are connected to the Intranet, but no other ip addresses are set. As transparent proxy, no other ip addresses are set.
----------------------------------
China Telecom --- BSD --- Server 1
Netcom --- IPFW ---- Server 2
, |
, |
, Internal network card
This is the network adapter topology.
How do I write rules?
For example, ipfw add 10101 allow tcp from any to 60.100.149.186 2121 in via sk0
Ipfw add 10102 allow tcp from 60.100.149.186 to any out via sk0
Ipfw add 10104 allow tcp from any to 221.112.105.104 80 in via em0
Ipfw add 10403 allow tcp from any to 221.112.105.104 8010 in via em0
Ipfw add 10403 allow tcp from any to 221.112.105.104 443 in via em0
Ipfw add 10403 allow tcp from any to 221.112.105.104 2121 in via em0
Ipfw add 10404 allow tcp from 221.112.105.104 to any out via em0
Is that true? sk0 is the NIC connected to China Telecom. em0 is the NIC of China Netcom. Please help me.
Where is my error?
If I remove ipfirewall_default_to_accpet from the kernel
Finally, use ipfw show. Here the custom rule is enabled.
Last display
Deny ip from any to any
The entire network is disconnected.
Is my custom rule ineffective or something?
??????????????
Rc. Whether to declare all NICs in conf,
One problem is that I comment out options IPFIREWALL_DEFAULT_TO ACCEPT in the kernel, but not all networks can be accessed, But I have loaded the new rules.
That means my rules didn't work, right,
The key is bridging. I want to perform bridging. The optical fiber access for China Telecom corresponds to two NICs, and the same is true for China Netcom. Then, telnet is used to configure and manage the remaining Nic. Five ip addresses are set only for telnet.
How can I configure a bridge between five NICs and four NICs? Are you free?
Thank you.
Rc. Do I need to declare all NICs in conf?
The corresponding bridge is added to the sysctl file.

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.