ALL 4 DEVICES need to be in the same subnet
the router is a "smart" device
unless you clear everything in it's programming,, it will send data IN IT'S SPECIFIED SUBNET out the wan connection.
IT MAY OR MAY NOT pass things through that are in a different subnet. THIS DEPENDS ON IT'S FIRMWARE...