Cookie-Cutter Networks with Duplicate IP Ranges

Started by deanwebb, August 26, 2019, 09:50:48 AM

Previous topic - Next topic

Otanx

Cloud AI is just someone else's computer brain.

-Otanx

deanwebb

Update... found a customer network where, somehow, devices with 192.168 addresses were gettin' around. Customer was supposed to only be using addresses in the 10 range, but we just discovered a writhing mass of home devices, with traffic routing around on the internal network.

Where are the devices? Hard to say, since so many have duplicate addresses...
Take a baseball bat and trash all the routers, shout out "IT'S A NETWORK PROBLEM NOW, SUCKERS!" and then peel out of the parking lot in your Ferrari.
"The world could perish if people only worked on things that were easy to handle." -- Vladimir Savchenko
Вопросы есть? Вопросов нет! | BCEB: Belkin Certified Expert Baffler | "Plan B is Plan A with an element of panic." -- John Clarke
Accounting is architecture, remember that!
Air gaps are high-latency Internet connections.

Dieselboy

Easy. Configure the customers edge with routes to `null0` for the other networks that are outside of the customers 10.x.x.x range. Then go pull yourself a beer, safe in the knowledge your customer is secure once again  :eek:

deanwebb

Quote from: Dieselboy on September 12, 2019, 11:36:50 PM
Easy. Configure the customers edge with routes to `null0` for the other networks that are outside of the customers 10.x.x.x range. Then go pull yourself a beer, safe in the knowledge your customer is secure once again  :eek:

That was my recommendation, since the whole environment was constantly in flux.
Take a baseball bat and trash all the routers, shout out "IT'S A NETWORK PROBLEM NOW, SUCKERS!" and then peel out of the parking lot in your Ferrari.
"The world could perish if people only worked on things that were easy to handle." -- Vladimir Savchenko
Вопросы есть? Вопросов нет! | BCEB: Belkin Certified Expert Baffler | "Plan B is Plan A with an element of panic." -- John Clarke
Accounting is architecture, remember that!
Air gaps are high-latency Internet connections.

Otanx

Quote from: Dieselboy on September 12, 2019, 11:36:50 PM
Easy. Configure the customers edge with routes to `null0` for the other networks that are outside of the customers 10.x.x.x range. Then go pull yourself a beer, safe in the knowledge your customer is secure once again  :eek:

We do this with all RFC1918 space, and bogon stuff. We have a pair of Quagga servers that peer with all our edge devices, and hand out those, and any malicious IPs supplied by our cyber team.

-Otanx

icecream-guy

Quote from: Otanx on September 16, 2019, 08:36:09 AM
Quote from: Dieselboy on September 12, 2019, 11:36:50 PM
Easy. Configure the customers edge with routes to `null0` for the other networks that are outside of the customers 10.x.x.x range. Then go pull yourself a beer, safe in the knowledge your customer is secure once again  :eek:

We do this with all RFC1918 space, and bogon stuff. We have a pair of Quagga servers that peer with all our edge devices, and hand out those, and any malicious IPs supplied by our cyber team.

-Otanx


Thought Bogons were a thing of the past, at least for IPv4, since all the IP space is now exhausted.
Still got to check for Martians.
:professorcat:

My Moral Fibers have been cut.

Otanx

I guess it depends on how you define Bogons vs Martians. I had to look it up. Team Cymru (who I kind of see as the experts) list Bogons as including all Martians plus unallocated space. So Martians are a type of Bogon address. However, other references I found flip that and say Bogons are just the unallocated space, and that Bogons are a type of Martian. However, I will say I have not heard of anyone calling these Martian filters even if that is what they are.

To be more specific we include all RFC 1918, CGNat, and all the other IPs from different RFCs that should not be on the internet. We also filter out all "Class D" and above. Multicast shouldn't be hitting our edge. Also 127.0.0.0/16. We also have uRPF configured so the filters will drop traffic with those as source addresses as well. This lets us detect mis-configurations on our gear (wrong NAT statements usually), and/or weird traffic from the internet like someone trying to DoS us with a source of 127.0.0.1.

-Otanx


Dieselboy

Nice! :)

I have configured firepower to do something similar but it's about time for me to go and eval the config and tweak.

On the edge routers/ASAs I do this:
route Null0 10.0.0.0 255.0.0.0 254
route Null0 172.16.0.0 255.240.0.0 254
route Null0 192.168.0.0 255.255.0.0 254


I took that from Cisco's config guide for VTI tunnel IPSEC. The guide said to do that so when the VTI tunnel is down, the ASA does not just send the traffic out to the internet unencrypted 🙈 I Thought "yea good point"  :mrgreen:

deanwebb

This is some great tips and info in this thread. Basically, a panel discussion on how to deal with IP ranges that devices and/or users bring with them to your network.
Take a baseball bat and trash all the routers, shout out "IT'S A NETWORK PROBLEM NOW, SUCKERS!" and then peel out of the parking lot in your Ferrari.
"The world could perish if people only worked on things that were easy to handle." -- Vladimir Savchenko
Вопросы есть? Вопросов нет! | BCEB: Belkin Certified Expert Baffler | "Plan B is Plan A with an element of panic." -- John Clarke
Accounting is architecture, remember that!
Air gaps are high-latency Internet connections.

Otanx

Quote from: Dieselboy on September 16, 2019, 09:08:26 PM
Nice! :)

I have configured firepower to do something similar but it's about time for me to go and eval the config and tweak.

On the edge routers/ASAs I do this:
route Null0 10.0.0.0 255.0.0.0 254
route Null0 172.16.0.0 255.240.0.0 254
route Null0 192.168.0.0 255.255.0.0 254


I took that from Cisco's config guide for VTI tunnel IPSEC. The guide said to do that so when the VTI tunnel is down, the ASA does not just send the traffic out to the internet unencrypted 🙈 I Thought "yea good point"  :mrgreen:

Yep that is basically what happened to us, but on a DMVPN router. We fixed it by using a VRF for the internet facing interfaces, and then added the drops as a way to alert.

Because you brought it up. One other place I have seen the duplicate IP issue is with IPSec tunnels. The VTI needs a /30 for the tunnel. You don't really use these IPs for anything except next hops. A lot of people I have had to deal with like using RFC1918 space for this. The problem is trying to de-conflict address space not just between us and them, but us, them, and all the other "thems" we have tunnels with. We force using public space for that now (and /31 if possible).

-Otanx