1

My server has 2 network card installed and I manage to get it up and running. I can ping both interface but I can not ssh or access any service (ie web/ftp) if I connect using second interface.

Both network card have 2 different IP address and live on different subnet.

How do I create routing table so packet are returned via the interface where the packet coming from ie : "if packet coming to eth0, it should come out from eth0 using eth0 gateway. If packet is coming from eth1, then the outgoing response also coming out from eth1 using eth1 gateway"

Is this possible ?

1

Yes, this is possible using policy based routing. You need to use ip route and ip rule commands

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.