LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-05-2013, 05:30 AM   #1
Ninja2k
LQ Newbie
 
Registered: Aug 2013
Posts: 3

Rep: Reputation: Disabled
Routing between subnets in a Linux virtual machine


I have two Debian Linux Virtual Machines with two virtual adapters each, both adapters are on separate subnets. I need two subnets to test security tools

Subnet 1 - 192.168.50.x
Subnet 2 - 192.168.70.x

I need the two subnets to be able to communicate with each other but I have only very basic Linux.

Is it possible to route the information between the two subnets preferable without an external router?
 
Old 08-05-2013, 01:36 PM   #2
codeguy
Member
 
Registered: Jan 2004
Distribution: Slackware
Posts: 129

Rep: Reputation: 16
Ahh.. I think you can set your netmask to 255.255.0.0 (on both interfaces), and you should be just fine.
 
1 members found this post helpful.
Old 08-05-2013, 02:39 PM   #3
TimothyEBaldwin
Member
 
Registered: Mar 2009
Posts: 249

Rep: Reputation: 27
Edit /etc/sysctl.conf to turn on routing on reboot.
Code:
sysctl -w net.ipv4.ip_forward=1
Will do so immediately.
 
1 members found this post helpful.
Old 08-05-2013, 03:13 PM   #4
Ninja2k
LQ Newbie
 
Registered: Aug 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TimothyEBaldwin View Post
Edit /etc/sysctl.conf to turn on routing on reboot.
Code:
sysctl -w net.ipv4.ip_forward=1
Will do so immediately.
That works really nicely, thanks for that. Much appreciated.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How To Set Up A TOR Middlebox Routing All VirtualBox Virtual Machine Traffic Over The TOR Netw LXer Syndicated Linux News 0 02-08-2012 12:30 PM
subnets and routing evilted Linux - Networking 19 08-20-2009 06:16 AM
Running virtual pc files in a virtual machine in linux ... preferably virtual box biharibong Linux - Software 4 01-21-2009 02:04 PM
Routing between two subnets ScottReed Linux - Networking 22 10-24-2006 11:32 PM
Routing between different subnets ... suvajit Linux - Networking 1 05-15-2003 08:07 AM


All times are GMT -5. The time now is 08:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration