LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Route all traffic, incoming and outgoing thru another machine (https://www.linuxquestions.org/questions/linux-networking-3/route-all-traffic-incoming-and-outgoing-thru-another-machine-4175559573/)

tram12 11-22-2015 10:06 AM

Route all traffic, incoming and outgoing thru another machine
 
Hi.

I hope someone can help me find the best solution for this scenario. The setup is kind of simple.

I have two servers with different public IPs (server A and B). I want server B to be "hidden" behind server A. All traffic to AND from server B should go thru server A (also outgoing so that the IP of server A is the one showing on all outgoing traffic).

The setup will experience high load during business hours so I need the best possible performance, encryption between the servers is not needed.

What solution do you recommend? I´m running Ubuntu on both servers.

Thank you for your opinion.

smallpond 11-22-2015 10:35 AM

For ipv4 use NAT in iptables on server A to hide server B. For traffic originating from B source NAT rewrites the source address on outbound packets and the dest address of inbound packets. If you run services on B that need to be reachable from the internet you need port forwarding and dest NAT.

tram12 12-03-2015 02:02 PM

Hello.

Thank you.

I googled your solution and came across this article with some working examples:

https://thewiringcloset.wordpress.co...ble-snat-dnat/

So, problem solved.

Thanks.


All times are GMT -5. The time now is 01:43 AM.