Port Forwarding DNS to external DNS server
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2019 05:52 PM - edited 03-10-2019 01:09 AM
Hello,
I have a scenario with a client network, a network with a dns server and in the middle an ISP that gives internet to both networks.
In PC_CLIENT I added in the file /etc/network/interfaces the following line "dns-nameserver 5.22.155.124" this IP is the R1 f0/0 ip the interface directly connected to the ISP.
What I want is to redirect the dns requests on the router to the DNS server
For this to happen I made the following configuration on router R1:
int f0/0 (interface connected to the ISP)
ip nat outside
int f1/0 (interface connected to the DNS server)
ip nat inside
This is a GNS3 scenario for a school project!
- Labels:
-
Other Security Topics
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2019 07:23 PM
The nat has been done in R1 and its outside up 5.22.155.124 which means your dns entry on your PC client is wrong.
If you run nslookup www.google.com 5.22.155.124, does it work?
Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2019 11:03 PM
adding to @Francesco Molino,
You may see other issue here as i think of now is, is your RC also doing NAT ? , how is PC_CLIENT have reachability to DNS Server you wan to use ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2019 11:04 PM
adding to @Francesco Molino
You may see other issue here as i think of now is, is your RC also doing NAT ? , how is PC_CLIENT have reachability to DNS Server you wan to use ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2019 06:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2019 02:36 PM
in PC_CLient i have dns-nameserver 5.22.155.124, i cant acess any webpage and the nslookup dont work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2019 08:40 PM
Can you do a show ip nat translation on R1?
If you do wireshark on the inside interface of R1, can you validate that you see dns packets?
Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2019 08:45 AM
!
hostname RC
!
interface FastEthernet0/0
ip address 192.168.20.254 255.255.255.0
ip nat inside
ip virtual-reassembly
duplex auto
speed auto
!
interface FastEthernet1/0
ip address 5.22.155.125 255.255.255.248
ip nat outside
ip virtual-reassembly
duplex auto
speed auto
!
ip route 0.0.0.0 0.0.0.0 5.22.155.126
!
!
ip nat inside source list 100 interface FastEthernet1/0 overload
!
access-list 100 permit ip any any
!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2019 06:17 PM
Does your internal dns server able to resolve www.google.ca?
Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2019 07:35 PM
yes, because of the named.config.options, in this file i have forwarder to 8.8.8.8
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2019 07:43 PM
Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2019 08:40 PM
That mean your RC configuration have issue. can you post below outputs to understand setup.
1. From R-ISP2 - post ping 8.8.8.8 ( question here is on R-ISP2 what is the outside IP address ?)
2. From RC - post ping 8.8.8.8 and post the configuration to have look NAT
3. PC_Client : post ping 8.8.8.8 and ping RC inside IP and OUITside IP and R-ISP2 Inside IP and Outside (post all the output)
suggest to post all the device show running config.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2019 08:40 AM
i can ping 8.8.8.8 i all interfaces in all routers
