Most likely you have galvanized pipes that have rusted. There is no way to clean rust out of old galvanized pipes. Most dishwashers have a screen where the water connects to the machine. You access it through the lower front panel. Another solution would be to put a filter on just the hot water pipe to the dishwasher. If you replace the pipe – use copper – and connect to the old galvanized with a dialectic union.