 PA23 join:2001-12-12 East Hanover, NJ | NAT redirection? I have several devices on my network that have hardcoded NTP servers in them, these devices have been put in their own VLAN on my network. What I would like to do is when I see them attempt to access the external NTP server is to redirect it to my internal NTP server
specifically the device addresses are on - 192.168.1.0/24
I want to redirect them to -
192.168.0.10
both networks are located on the same router (different interfaces)
192.168.1.100 attempts NTP to 1.2.3.4 I want to rewrite that destination address to be 192.168.0.10
the interface these devices are on is already listed as "nat inside" and so is the interface that my NTP server sits on. Tne nat outside interface is on the interface facing my ISP.
suggestions? Pointers?
Thanks! -- It's the end of the world as we know it, and I feel fine |
|
 nosx join:2004-12-27 00000 kudos:5 1 edit | If you need to do it with JUST the router, you might not be able to use the traditional inside/outside nat to accomplish your objective. You will need to look into the nat virtual interface (NVI) and use "ip nat enable" on your interfaces. googling ip nat enable should probablly give you decent results. Ideally for better NAT control you want a real firewall that can do policy NAT to rewrite anything anywhere any which way. Good luck. |
|
 | route map? |
|
 nosx join:2004-12-27 00000 kudos:5 | The question isnt necessarily so much acl vs routemap vs whatever. Its what interface is inside and what interface is outside. You have a clear inside 192.168.0.0/24 (LAN) and clear outside (Internet) and another interface 192.168.1.0/24(somethingelse). If you make the somethingelse an inside interface, I have never been able to successfully destination nat traffic from it. At the same time, if you make it an outside interface, it wont be souce-natted to get to the internet. There is no clear inside or outside tag for that somethingelse interface as it would need to be inside for internet access but outside for dest nat purposes (rewrite packets dst to 1.2.3.4 to 192.168.0.10) which breaks the inside/outside model. Thats why i suggested the NVI with ip nat enable because you could technicly try to rig something up with PBR and accomplish his goal. |
|
 aryobaPremium,MVM join:2002-08-22 kudos:1 | reply to PA23 said by PA23:I have several devices on my network that have hardcoded NTP servers in them, these devices have been put in their own VLAN on my network. What I would like to do is when I see them attempt to access the external NTP server is to redirect it to my internal NTP server specifically the device addresses are on - 192.168.1.0/24 I want to redirect them to - 192.168.0.10 both networks are located on the same router (different interfaces) 192.168.1.100 attempts NTP to 1.2.3.4 I want to rewrite that destination address to be 192.168.0.10 My question is that why would any of your devices attempt to reach NTP server of 1.2.3.4 in the first place? Are the devices configured to use NTP server of 1.2.3.4 as either primary or secondary?
If you don't want any of the devices to use NTP server of 1.2.3.4 at all, then maybe you should take NTP server of 1.2.3.4 off the device configuration. Implementing NAT in such setup would probably just make the network unnecessary complex.
Just my 2c  |
|
 nosx join:2004-12-27 00000 kudos:5 1 edit | Many pieces of equipment are designed and engineered by people that have little or no network knowledge. This is particularly true of programable logic controllers and other process automation and control systems. For example, a large electric company I consulted for had systems that controlled their generators but the company that designed the control systems hard coded (as in the assembler code running on the chips) the 192.168.0.0 network in all of them, set to report information to 192.168.0.100 etc. This is cleraly idiotic however the only solution was to drop a small PIX in front of every management control network and do bi-directional NATting to ensure that the equipment was reachable throughout the company. I guess the people that built the control system for the generators never imagined that a company would have 7 different power plants on the same network... idiots. Aaaaanyways, its very common to find small hardware devices hard coded to talk to one thing or another (or with a hard set ip address that cant be changed) and this leads to all kinds of network trickery required like source and destination natting. I doubt that the NTP server is actually set to "1.2.3.4" however the point is valid, its set to something that isnt what he wants.
Another alternative is to actually add a network (or secondary network) to the router for the 1.2.3.0/24 and assign a secondary ip to the NTP server of 1.2.3.4. That way no NAT at all is required and traffic is just routed to the correct device (eventhough the IP is still hard coded wrong). The only downside is that you are potentially blackholing internet-bound traffic to the 1.2.3.5 or 1.2.3.6 devices, so you might want to make the subnet as small as possible and see what you are blackholing. The same electric company before ended up blackholing proctor and gambles internet addresses trying to do just this same stunt to make some of their other hardware work. Not to mention the multiple moronicly-sized /15 "control" networks that sucked up the majority of their RFC1918 space. |
|
 PA23 join:2001-12-12 East Hanover, NJ | reply to aryoba said by aryoba:If you don't want any of the devices to use NTP server of 1.2.3.4 at all, then maybe you should take NTP server of 1.2.3.4 off the device configuration. Implementing NAT in such setup would probably just make the network unnecessary complex. Just my 2c Unfortunately I don't control the equipment that is using a public NTP server (its actually going after nist.gov or something like that) and there are several of them polling every minute or so.
nosx  I'll take a look at NVI, never looked at it.
Keep in mind this is more of an exercise to see what I can and can not do, there is really no absolute reason I must do this, but then again how else do you learn? -- It's the end of the world as we know it, and I feel fine |
|
 nosx join:2004-12-27 00000 kudos:5 | Id go for it, i dont know any reason why not. If you are just doing it to play find the IPs its talking to and add secondary addresses to the LAN interface of your router and the NTP server. It would be a fast and simple way to redirect the traffic. |
|