Help with turning my computer into a Linux router

Issues related to configuring your network
Post Reply
Twitch202
Posts: 2
Joined: 2015/02/11 21:49:19

Help with turning my computer into a Linux router

Post by Twitch202 » 2015/02/11 22:21:35

Hi all!

I am brand new to this community and I first want to just tell a little about myself and why I am here. I am currently attending a university and getting very close to graduating with my bachelors. I focus on Cisco networking, so Linux in general is a very gray area for me. I did take some Linux courses, albeit, beginner and basic courses years ago. Right now I am in a projects class that I am required to take. We had to submit a project proposal of what we wanted to do, as long as it had something to do with networking. We were also advised to move "outside" our comfort zone, expand, and hopefully learn some things that our classes didn't teach. I decided to go the Linux route and make my own Linux router. Then I plan on using a Raspberry Pi as a wireless router and making a small home network based on Linux. But for now, ignore the Raspberry Pi part.

I did some searching online and found that it was possible to take an ordinary computer, install some sort of Linux based OS, and turn it into a functioning router. My main plan at this moment is to figure out how to do this successfully. This router can be a pretty basic. I just need it to be able to route traffic between two subnets (for example) and reach the Internet.

Currently I have a computer that I installed CentOS on and I bought an extra NIC card. I would really appreciate if someone (or multiple people) would be willing to help me out. Now I am not saying just do my project for me, not in the least. But since I am not familiar with Linux based OS's, including CentOS, I do need some help. There are some "guides"/tutorials on how to do this but looking at some, it just doesn't seem to be what I'm exactly looking for.

Some questions that I have at the moment are:
-Is CentOS is a valid/good choice for an OS to use as a Linux router? I did some research on this and found that there are many different distributions that can be used but at the time CentOS stuck out to me the most.

-I can't figure out how to install my second NIC or even make sure my main NIC is working/recognized. Any ideas?

-Now just a general question (and very vague) but, does anyone have any tips/tricks on the easiest way to turn a computer into a Linux router?

I do have some time, the project isn't due until mid to late March. Any help is much appreciated!

Thank you!

aks
Posts: 2538
Joined: 2014/09/20 11:22:14

Re: Help with turning my computer into a Linux router

Post by aks » 2015/02/12 20:20:11

Is CentOS is a valid/good choice for an OS to use as a Linux router?
It's okay, but some other distribution are more "tuned" for routing - other distributions make it easier. CentOS is designed for corporate ABI/API stablity in a general way (the same as RHEL is).
I can't figure out how to install my second NIC or even make sure my main NIC is working/recognized. Any ideas?
(Assuming physical hardware). Use the command ip link sh to see the MAC addresses of your network interfaces. If you see both NICs, then they are "working" in that they are recognized by the kernel and the system can send data to and from them. If a NIC is missing, then you probably need a driver for the particular NIC. Just google....
Now just a general question (and very vague) but, does anyone have any tips/tricks on the easiest way to turn a computer into a Linux router?
Install 2 working NICs. Assign different subnet addresses to each interface. Allow IP forwarding in sysctl and in the firewall. Test with a couple of machines on each subnet. Done. Really easy.
That's the answer in it's purest form. A router passes data and makes decisions based upon layer 3 (networking) information. Some people confuse additional services (like DHCP, DNS etc.) with the function of a router. This is not the case. It is the case that often routers provide these additional functions, but their primary task is to forward packets based on a routable protocol (such as IP, or if you're old like me, IPX - rock on bit flagged addressing). A link to how to do this with all these additional things: http://www.bromosapien.net:8080/media/i ... d_Firewall

Twitch202
Posts: 2
Joined: 2015/02/11 21:49:19

Re: Help with turning my computer into a Linux router

Post by Twitch202 » 2015/02/13 03:53:14

Thanks for the response!

Do you have any distributions that you would recommend for my situation?

User avatar
WhatsHisName
Posts: 1542
Joined: 2005/12/19 20:21:43
Location: /earth/usa/nj

Re: Help with turning my computer into a Linux router

Post by WhatsHisName » 2015/02/13 04:18:41


Elvi
Posts: 39
Joined: 2009/04/24 05:29:15

Re: Help with turning my computer into a Linux router

Post by Elvi » 2015/02/15 21:09:31

I second ipcop, it's a firewall/router all in one and can run on realy old hardware, has a web gui no dekstop gui.

dmunteanu
Posts: 1
Joined: 2015/02/19 22:05:39

Re: Help with turning my computer into a Linux router

Post by dmunteanu » 2015/02/19 22:07:43

I agree with the rest, IPCop worked wonders for me.

Post Reply