Super User is a question and answer site for computer enthusiasts and power users. 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

I have written the code for a server-client model on UDP and have tested it between 2 computers that are connected to the Internet, using their WAN IPs, and it works fine.

What I want to do now is to use the first computer/server as a router. Is this possible? Can I take an Ethernet cable out of the computer/server to the second computer/client and create a subnetwork like this?

share|improve this question
Without indicating a specific operating system you want to use on the "computer" that should act as a router, it's not possible to provide specific instructions. – allquixotic Jan 24 '13 at 14:38

In short... the answer is Yes.

The longer answer is quite a bit more complex. A router is a computer. The operating system and hardware are specifically designed for the task, but essentially they are the same. As far as setting up your own computer as a router, 99.9% of this question depends on what operating system you are running. Also, the kind of router also makes a difference. Windows has a built-in feature called Internet Connection Shairing which sets up a very simple NAT'ing router, whereas Linux operating systems uses a combination of iptables with the masquerade module and kernel-mode routing. Apple computers are very similar to Linux in the way you configure them, but I'm sure they have a simple GUI for configuring such. If you want a non-NAT'ing router, Linux can do this quite simply, but Windows has no way of doing this (without 3rd party tools) until you get to their Server platforms.

As far as a client/server application goes, there is really no need to implement a router from what I can gather by your question. Can you give some details about the scenario?

share|improve this answer
Thank you for your answer. I need to have a LAN where at the center I have the server-router and all around a number of clients. The operating system is Linux. – user192512 Jan 24 '13 at 16:01

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.