How to set up Red Hat Linux 7.3 as a subnet router (NOT a NAT/DSL router)

This HOWTO assumes that you have a basic knowledge of:

  • Installing cards in computers
  • Installing and using Linux
  • RPM Package Installation
  • Configuring network interfaces under Linux

This is actually quite simple, but not if you don't know what you're doing. This is (I hope) helpful to you, especially if the reason you're trying to do it is to learn. That's why I did it. After all, why would I need a subnet router in my own house?

Here is how to do it, in 5 steps:

  • Put two network card in the computer you want to use
  • Install Red Hat Linux (I used 7.3)
  • Configure the two network cards to have their IPs in different subnets (I used 192.168.1.1 and 192.168.0.1)
  • Enable port forwarding, as follows:
    echo 1 > /proc/sys/net/ipv4/ip_forward
  • Install (if you didn't in the first place) the routed RPM
  • It *should* work

Another problem I then came up with was that typing ipchains -L now gives me the error Incompatible with this kernel. Quite simple solution, use iptables, it's the same thing, but it works with routing enabled. It also seems to allow much more functionality, but don't rely on me, I'm only a beginner.