DNS translation feature configuration example

本文介绍如何在FortiGate设备上配置DNS翻译,使内部网络的DNS服务器能够被外部网络访问,并正确解析内部服务器的IP地址。具体步骤包括设置DNS会话助手、创建虚拟IP以及定义DNS翻译规则。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

DNS translation translates IP addresses in packets sent by a DNS server from the internal network to the external network. Use DNS translation if you have a DNS server on your internal network that users can access on the external network to find the IP addresses of servers on your internal network.

Note: This is usually a DNS server feature.

Configuring the DNS translation
on your FortiGate unit

  1. Configure the DNS helper using the CLI. Enter the following commands:

    config sys session-helper
        edit 15
              set name dns_udp
              set port 53
              set protocol 17
              next
        edit 16
              set name dns_tcp
              set port 53
              set protocol 6
              next
        end

  2. Configure one virtual IP for the DNS.
  3. Configure one virtual IP for each internal server.
  4. Configure a DNS translation rule for each internal server:

    config firewall dnstranslation
      edit 1 
      set dst'external address of the FortiGate'
      set netmask 255.255.255.255 
      set src 'internal address of the server'
      next 
    end

Configuration Example

Step 1: Session-Helper

 

config sys session-helper
    edit 15
        set name dns_udp
        set port 53
        set protocol 17
        next
    edit 16
        set name dns_tcp
        set port 53
        set protocol 6
        next
    end

 

Step 2: VIP for the DNS server

external IP 172.31.224.203
port 53
internal IP 10.100.0.3
port 53

 

Session 3: VIP for the internal web server

external IP 172.31.224.203
port 80
internal IP 10.100.0.23
port 80
 

Step 4: DNS translation rule for internal web server

config firewall dsntranslation
    edit 1
        set dst 172.31.224.203
        set netmask 255.255.255.255
        set src 10.100.0.23
        next 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值