SRX Services Gateway
Reply
Contributor
blacksmith
Posts: 21
Registered: ‎04-12-2010
0

Redirect DNS Traffic

[ Edited ]

Hi,

 

I tried to redirect DNS request from our network to specific DNS Server. In Linux I can do this using iptables

 

iptables -t nat -A PREROUTING -i <LAN_INTF> -p tcp --dport 53 -j DNAT --to-destination x.x.x.x

I tried this configuration but doesn't work:

 

pool DNS-Private {
    address 192.168.0.254/32 port 53;
}

 

[edit security nat]

destination {
    pool DNS-Private {
        address 192.168.0.254/32 port 53;
    }
    rule-set Redirect-DNS {
        from interface ge-0/0/1.619;
        rule DNS-All {
            match {
                destination-address 0.0.0.0/0;
                destination-port 53;
            }
            then {
                destination-nat pool DNS-Private;
            }
        }
    }
}


Any idea? Thanks.

 

Regards,

Yohanes

 

 

Contributor
blacksmith
Posts: 21
Registered: ‎04-12-2010
0

Re: Redirect DNS Traffic

Solve. No problem with the configuration.

Copyright© 1999-2013 Juniper Networks, Inc. All rights reserved.