1

I have remote Windows 2003 server with two network interfaces e.g. Cn1 and Cn2. I need that all traffic goes through Cn1 except for one port (for me it's 3389, rdp for administration) that works over Cn2.

Currently when I setup all connections work through Cn1, I completely lose connection over Cn2 - and can't connect to server via RDP over Cn2. Now I used static routing based on my ip address (which can changed - so it's bad).

2 Answers 2

1

The two interfaces are on the same network or on different ones?

On which one is the server's default gateway?

Where are you connecting from?

RDP normally listens on all the server's IP addresses, so you should be able to connect to any of them, unless some firewall (including the server's one) if blocking you.

But if all of the following is true, you'll have a so-called "split routing" problem, and you won't be able to connect:

  • The server has IP address A on network A and IP address B on network B
  • The server's default gateway is on network A
  • You're trying to connect to IP address B
  • You are not directly connected to network B

In this scenario, your packets will reach the server on IP address B, but it will send its replies via IP address A to its default gateway, because your address is not located on any network it can directly reach; so those packets can, and probably will, be dropped by some router in the middle, which will not like them (and for quite a good reason).


Edit:

A possible solution could be setting a static route on the server, in order to tell it to reach the network your client sits in via the same router the connection is coming through.

Let's say you have the following scenario:

Network A: 192.168.1.0/24
Network B: 192.168.2.0/24
Network C: 10.1.2.0/24

A default gateway for network A with IP address 192.168.1.1
A router between network B and network C with two IP address: 192.168.2.1 and 10.1.2.1

Server's IP on network A: 192.168.1.10
Server's IP on network B: 192.168.2.10
Server's default gateway: 192.168.1.1

Your client's IP on network C: 10.1.2.3
Your client's default gateway: 10.1.2.1

In this scenario, your connection will go through the router which sits between network B and network C, but the server will send its replies to network A's gateway (hence the split routing problem).

You could add a static route to the server to tell it to reach Network C via the other router:

ROUTE ADD -p 10.1.2.0  MASK 255.255.255.0 192.168.2.1

If this is your scenario, the static route solution should work fine.

6
  • Yes, you were right in all, but the question is how to make server to send replies via IP address B for packets that received on port 3389. May 7, 2010 at 7:04
  • This can't be done if the default gateway is on network A and your client needs routing to be reached. If your client was on network B, then replies would have been sent via IP address B; but since it isn't, the server will use its default gateway to reach it.
    – Massimo
    May 7, 2010 at 7:18
  • BTW, this can't be done at the port level; routing is always handled at the IP address level, you can't set routes only for certain ports.
    – Massimo
    May 7, 2010 at 7:19
  • Ok, but I believed that I could do port-level routing in Linux with iptables. I'm wrong about linux too or it's just windows can't do it? May 7, 2010 at 7:37
  • Linux can actually do that... although it's not actually that simple; AFAIK, there's nothing similar in Windows. But see my edit about the possible static route solution.
    – Massimo
    May 7, 2010 at 7:40
0

I haven't tried this but go into Terminal Services Configuration on the server in question, bring up the properties of the RDP-TCP protocol under the Connections node, click the Network Adapter tab, click the Network adapter drop down and select the adapter that you want RDP to be accessible on.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .