Slackware - Assigning routes (IP address ranges) to one of many network adapters

Posted by Dogbert on Super User See other posts from Super User or by Dogbert
Published on 2012-07-04T17:29:09Z Indexed on 2012/10/12 15:40 UTC
Read the original article Hit count: 234

I am using a Slackware 13.37 virtual machine within VirtualBox (current).

I currently have a number of Ubuntu VMs on a single server, along with this Slackware VM. All VMs have been set up to use "Internal Network" mode, so they are all on a private LAN, and can see each other (ie: share files amongst themselves), but they remain private from the outside world.

On on the these VMs (the Slackware one), I need to be able to grant it access to both this private network, and the internet at large. The first suggestion I found for handling this is to add another virtual network adapter to the VM, then set it to NAT. This results in the Slackware VM having the following network adapter setup:

-NIC#1: Internal Network
-NIC#2: NAT

I want to set up the first network adapter (NIC#1) to handle all traffic on the following subnets:

10.10.0.0/255.255.0.0
192.168.1.0/255.255.255.0

And I want the second virtual network adapter (NIC#2) to handle everything else (ie: internet access).

May I please have some assistance in setting this up on my Slackware VM?

Additionally, I have searched for similar questions on SuperUser and Stackoverflow, but they all seem to pertain to my situation (ie: they all refer to OSX, or Ubuntu via the use of some UI-based tool). I'm trying to do this on Slack specifically via the command-line.

Thanks!

© Super User or respective owner

Related posts about linux

Related posts about networking