{"id":187,"date":"2017-04-04T15:16:16","date_gmt":"2017-04-04T13:16:16","guid":{"rendered":"https:\/\/www.petersplanet.nl\/?p=187"},"modified":"2018-02-11T13:13:02","modified_gmt":"2018-02-11T11:13:02","slug":"create-your-own-test-lab-with-virtualbox","status":"publish","type":"post","link":"https:\/\/www.petersplanet.nl\/index.php\/2017\/04\/04\/create-your-own-test-lab-with-virtualbox\/","title":{"rendered":"Create your own Test Lab with VirtualBox."},"content":{"rendered":"<p>If you want to experiment with servers and applications you will probably need your own test lab\u00a0with virtual machines. The point is that you don&#8217;t want your test lab to interfere with your home network. This can be easily realised with Oracle VirtualBox and a network address translation network (NATNetwork) on \u00a0a workstation.<br \/>\n<!--more-->Go to the Oracle VM VirtualBox Manager \/ File \/ Preferences \/ Network<br \/>\nCheck the NATNetwork or add one if there is none.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-191\" src=\"https:\/\/www.petersplanet.nl\/wp-content\/uploads\/2017\/04\/vb-network.png\" alt=\"\" width=\"500\" height=\"349\" \/><\/p>\n<p>Edit the NATNetwork details so that it suites your environment.<br \/>\nImportant is the 10.0.2.1 address (x.x.x.1) is used as the gateway.<br \/>\nThe first address x.x.x.1 is used for host resolution.<br \/>\nFor a DNS server you could use 8.8.8.8 (Google).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-216\" src=\"https:\/\/www.petersplanet.nl\/wp-content\/uploads\/2017\/04\/vb-network-details.png\" alt=\"\" width=\"368\" height=\"317\" \/><\/p>\n<p>Because of NAT we are not able SSH directly from our workstation to the virtual machines. For this we need to set port forwarding as well. Keep the Host IP empty. This will be 127.0.0.1 (localhost). For the Host Port choose a free port on your workstation.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-217\" src=\"https:\/\/www.petersplanet.nl\/wp-content\/uploads\/2017\/04\/port-fwd.png\" alt=\"\" width=\"625\" height=\"382\" \/><\/p>\n<p>On a virtual machine you have to attach your network adapter to the NATNetwork. You do this in the Network settings of the virtual machine. (Choose 10.0.2.1 in this example as the gateway address in the network settings of your server.)<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-224\" src=\"https:\/\/www.petersplanet.nl\/wp-content\/uploads\/2017\/04\/network-server.png\" alt=\"\" width=\"637\" height=\"432\" \/><\/p>\n<p>If your Linux server has an IP address of 10.0.2.15 then you can SSH to it with 127.0.0.1 and port 11522 from your workstation.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-232\" src=\"https:\/\/www.petersplanet.nl\/wp-content\/uploads\/2017\/04\/putty-setting.png\" alt=\"\" width=\"319\" height=\"138\" \/><\/p>\n<p>Happy experimenting.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you want to experiment with servers and applications you will probably need your own test lab\u00a0with virtual machines. The point is that you don&#8217;t want your test lab to interfere with your home network. This can be easily realised with Oracle VirtualBox and a network address translation network (NATNetwork) on \u00a0a workstation.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-187","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.petersplanet.nl\/index.php\/wp-json\/wp\/v2\/posts\/187","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.petersplanet.nl\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.petersplanet.nl\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.petersplanet.nl\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.petersplanet.nl\/index.php\/wp-json\/wp\/v2\/comments?post=187"}],"version-history":[{"count":23,"href":"https:\/\/www.petersplanet.nl\/index.php\/wp-json\/wp\/v2\/posts\/187\/revisions"}],"predecessor-version":[{"id":365,"href":"https:\/\/www.petersplanet.nl\/index.php\/wp-json\/wp\/v2\/posts\/187\/revisions\/365"}],"wp:attachment":[{"href":"https:\/\/www.petersplanet.nl\/index.php\/wp-json\/wp\/v2\/media?parent=187"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.petersplanet.nl\/index.php\/wp-json\/wp\/v2\/categories?post=187"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.petersplanet.nl\/index.php\/wp-json\/wp\/v2\/tags?post=187"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}