So, I have these instructions on converting my Linux machine to a router using (enable IP forwarding, NAT). Now my laptop has only one NIC and I want to test this setup. Any ideas how I can do this? Do I need to use Linux in VM and there is no other way? Or is there a network config that can show routing behaviour with one interface only? (Please give details if required, I am not very good on linux)

Note: If there is a tool, I need any that works, not the very best in one's opinion.

closed as unclear what you're asking by terdon, Faheem Mitha, Anthon, Zelda, Timo Feb 28 '14 at 16:13

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • How to test what exactly? What are these instructions? Why don't you just follow them? – terdon Feb 28 '14 at 14:51
  • databook.bz/?page_id=697 These are the instructions, but it uses 2 NICs, I have one only, so most probably a VM based solution may work, I am not sure though. That's why I asked for help. – JuliandotNut Feb 28 '14 at 14:56
  • In addition, I want my router to work with arbitrary number of interfaces, which I think above mentioned settings will do. Please suggest if otherwise. – JuliandotNut Feb 28 '14 at 15:01
  • Considering your two questions, I think you should first test your environment on a virtual machine, on a virtual network. There you will be able to test all the configuration options easily. See for example virtualbox.org/manual/ch06.html – Cilyan Feb 28 '14 at 15:52

If you read the instructions, it says clearly:

Three things are required to make a Linux box into a router. From a hardware standpoint you need two NICs.

Hence, unless you use a virtual machine when you can create as many virtual NICs you like, no, you can't make your system a router.

  • There is another config, called 'router on a stick', can I use Linux router to do that? It requires one interface for physical routers. And probably it will tell if machine is working as a router or not? – JuliandotNut Feb 28 '14 at 16:21

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