Can you connect two playstation 2’s together in this method? (see details)?

Can you connect two playstation 2’s together by connecting them directly to each other via an ethernet cable, or do you need a router in the middle? Im trying to set up for LAN play, not to the internet