Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Im configuring a linux centos sever for testings and the network configuration for it is:

WAN 1= eth0 WAN 2= eth1 LAN = eth2

server is configured to be a non transparent proxy without authentication, every client has configured the proxy and IP port on the browsers. Internet access is working fine from the client computers; computers are in the 192.168.10.x/24 range and also the default gateway for the computers is

We need to redirect windows Remote Desktop traffic from the LAN from eth2 to eth1 only. this because the WAN2 link is more stable and that fits our needs to keep the RDP session alive. The final destination server which has the RDP enabled so we can work has the IP and access is provided by a router from the ISP.

How can I configure this in the server so RDP protocol (port 3389) can be redirected to eth1 and the rest of the traffic keeps using the eth0 link?

Im lost about what approach to take, i dont know for sure if this can be accomplished using iptables or if else it has to use iproute2.

Thanks in advance.

share|improve this question

2 strategies I use to address this challenge:


  1. I identify my eth0 and eth1 by binding them with static ip address individually.

  2. I then establish port forwarding protocols, and it'd forward the traffic via ip address & ports at my choices.

Strategy A

Method but done by router on my system (I flashed my router with new "BIOS". Thanks goodness for DD-WRT. Google it)

Strategy B

Method but done by iptables. The machine that controls iptables needs to be local DNS resolver (DNSMasq-ing) [in other words, 'gateway'].

I always opted for Strategy A. It's dirty fast. But Strategy B is far better in terms of enhanced security if multi-users are involved.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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