Dynamic DNS for application of iptables firewall

Source: Internet
Author: User
Tags bind client ftp protocol iptables firewall

First, the core idea

The core idea of configuring a dynamic DNS server is to run multiple bind on a DNS server, each of which provides resolution for users from different zones, so each bind should have a different profile and domain file and be monitored separately on different ports. When a client DNS request is received, the request redirects the different bind service ports according to the client's IP address.

When Bind responds, the service port of the corresponding package is overwritten with the standard 53 port. This allows different resolution results to be returned to the client based on the IP address of the client. The entire process is transparent to the client. The key to implementation is to run different bind and use Iptables for IP address and port rewriting operations.

For more detailed information about iptables, please refer to the two articles in the solution-"Iptales firewall with the implementation of" and "Implementing NAT with Iptables".

Second, the configuration process

Step 1: Configure the kernel

NetFilter requires the kernel version to be no less than 2.3.5, and when compiling the new kernel, you need to select and NetFilter related items. These items are usually located under the Networking Options subkey. Take the 2.4.0 kernel for example, the items we should select are:

[*] Kernel/user netlink Socket!;

[] Routing messages

<*> NetLink device emulation

[*] Network packet filtering (replaces IPChains)

.......

Then, in the "Ip:netfilter Configuration---->" Check:

Connection tracking (required for Masq/nat)

FTP protocol Support

IP tables Support (required for Filtering/masq/nat)

Limit match Support

MAC Address Match Support

NetFilter MARK Match Support

Multiple Port match support

TOS Match Support

Connection State Match Support

Packet filtering

&! nbsp REJECT Target Support

Fu ll NAT

Masquerade Target Support

REDIRECT Target Support

Packet mangling

TOS Target Support

MARK Target Support

LOG Target Support

IPChains (2.2-style) support

Ipfwadm (2.0-style) support

The last two items may not be selected, but if you miss IPChains or IPFWADM, you can also select them to use Ipchians or ipfwadm in the 2.4 kernel. However, it should be noted that iptables is opposed to Ipchians/ipfwadm, in the use of iptables can not simultaneously make ipchains/ipfwadm.

After successful compilation, these module files are located in the following directory/lib/modules/2.4.0/kernel/net/ipv4/netfilter



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.