xyrer said: the lan2lan can't be gateway because of the lack of internet, I need proxy and stuff.
it probably can if it has a default route out to the internet. And if you have web access through a proxy, that proxy needs some way of internet access, but that doesn't necessarily mean the proxy itself needs to be on a router that is configured to be default gateway for the hosts that use the proxy. And so on. Your network as a whole might need some work, but for now option B/ might be the easiest / preferred approach
xyrer said:
So that command... is there any pre-requisite for that to work? I mean, it looks like the server needs to have an interface configured to that subnet or something, I will study it anyway, but to be clear... does that command means that everything going to 10.10.57.0 is going to 10.10.2.2 regardless of where that ip is? pre-requisite : the server needs a way to communicate with 10.10.2.20, but as they are on the same subnet, that's covered. The added route will probably disappear when you reboot, because it's not discoverable. You can use a startup script to set it at every system restart, same as you do with iptables statements.
what it does: it creates an entry in the kernel routing table, saying that any packet with a destination address that is in subnet 10.10.57.0/255.255.255.0 should be send to 10.10.2.20 ; no more, no less.
10.10.2.20 will re-evaluate the packet's destination, and take the next routing decision - if 10.10.2.20 knows a route to 10.10.57.0/255.255.255.0, the packet will be sent on that route. If not, it will be sent on 10.10.2.20's default route.
I have no 2 spare networks handy to test it all, but I'm pretty sure it'll work. Maybe the route command needs some tweaking (man route for syntax etc). You might have to check the routing on that lan2lan thingie to make sure reply-packets can be routed back from 10.10.57.0/255.255.255.0 to where-ever the need to go.