Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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!

share|improve this question

1 Answer 1

up vote 2 down vote accepted

To change network config in slackware in CLI interface. As root,

nano /etc/rc.d/rc.inet1.conf

You have to edit your interface (eth0, eth1 im guessing) with the required parameter but the structure is already there. then ctrl-x, Y, enter (with nano, to exit and save changes). after that run the following cmd:

/etc/rc.d/rc.inet1 eth0_restart
/etc/rc.d/rc.inet1 eth1_restart

as root of course. Now in a V.M., you might have to reboot after you added the nic, before these commands. Maybe there is a way without rebooting, but I don't know.

share|improve this answer

Your Answer

 
discard

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.