looking for a solution to create virtual switches and virtual router in a linux host (open vswitch may be) [closed] - linux

Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 days ago.
Improve this question
I am looking for a solution to create several virtual switches connected by a virtual router on a single linux pc. I would like to create a test and development enviroment and use my linux pc's, kvm/qemu/libvirt for the virtual machines or containers.
My intentions is to create several virtual networks for each domain (test, development, production etc.) and connect them via virtual router to my physical lan. I want to do all these in a single linux pc. I do not want to host lost of services like openstack neutron etc. or dedicate a pc totally to an environment such as proxmox/openstack.
I have understood that openvswitch can create virtual switches as the name suggests, but I have not been able to find any instructions related to creating a virtual router. I have seen some posts routing the these switches' traffic with kernels network configuration, but I am more looking for virtual switches/routers and their virtual interfaces without messing my host routing settings often and manually.
I will connect my custom build kvm/qemu containers or virtual machines to these enviroments. I do not want to be forced to some type of image setup as in openstack, vargant or docker offers.
My internet searches pointed me, open virtual networking (ovn) which claims to do virtual switches, routers etc and seems to be using openvswitch underneath. However ovn seems like it requires higher level of tooling or services such as openstack etc. I have not seen a proper package for that in arch linux as well.
To make long story short:
Can I create several private network switches for such as 192.168.100.0/24, 192.168.101.0/24, 192.168.102.0/24 for host, test, developenment etc. and connect them to a virtual router and make these machines accessible from my lan via openvswitch in a reqular linux box.
If not, which toolset I can use to achive that. I am only interested in the networking stack, I would like to be free of any other stack or technology such as openstack, proxmox, vagrant or docker which came as bundled with their services, image types etc.
Any help much appreciated.

Related

Docker - Which environment is actually running on Windows 7? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I’m new to docker, started to learn about it but I’m a little confused.
I need to run app on windows environment.
I have Windows 7 – native Docker is only for Windows 10, so I need to download the Docker toolbox for Windows 7.
The toolbox is actually using a Linux VM to run it.
So, in this state I will actually create a container with windows environment or Linux environment?
Is the Docker for windows 10 also uses Linux?
Thanks
To kinda answer your question: Windows 7 uses a linux to run docker because it needs certain kernelfeatures, which W7 doesn't have.
Windows 10 or Windows Server 2016 adapted to the whole containerization movement and included those features, so Windows Containers can be run from it directly.
Also the problem tgogos referenced, with windows containers not being able to run on linux hosts and vice versa is a problem which (afaik) can be solved by using an additional linux VM on the windows host, so you have both environments. I wouldn't personally recommend it, but I think it's possible.
Anyways, you won't really need this, as windows applications still will be running on Windows hosts and linux applications on linux.
Containers are mainly a more efficient, more manageable way to deploy applications.
Containers are not VMs, they rely on the host OS and this means you can't run directly:
a windows container on linux
a linux container on windows
without using some kind of virtualization that will provide the layer needed for each case. For example, Docker toolbox for Windows makes use of Oracle VM VirtualBox, in order to run linux containers.
more about Windows containers:
Windows Container Types
Windows Containers include two different container types, or runtimes.
Windows Server Containers – provide application isolation through process and namespace isolation technology. A Windows Server Container shares a kernel with the container host and all containers running on the host. These containers do not provide a hostile security boundary and should not be used to isolate untrusted code. Because of the shared kernel space, these containers require the same kernel version and configuration.
Hyper-V Isolation – expands on the isolation provided by Windows Server Containers by running each container in a highly optimized virtual machine. In this configuration, the kernel of the container host is not shared with other containers on the same host. These containers are designed for hostile multitenant hosting with the same security assurances of a virtual machine. Since these containers do not share the kernel with the host or other containers on the host, they can run kernels with different versions and configurations (with in supported versions) - for example all Windows containers on Windows 10 use Hyper-V isolation to utilize the Windows Server kernel version and configuration.
Running a container on Windows with or without Hyper-V Isolation is a runtime decision. You may elect to create the container with Hyper-V isolation initially and later at runtime choose to run it instead as a Windows Server container.
Further reading:
Linux machine with docker deploy windows container
Can Windows Containers be hosted on linux?
Can I run windows containers using docker-toolbox on windows 7?

Remotely install Linux on Windows xp using TeamViewer [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
Our customer has about 800+ computers running Windows XP distributed across the country. Each computer can be accessed using TeamViewer. The goal is to replace XP by a Linux distribution remotely.
Does anybody know if this is possible, and where to start?
Thanks!
PXE is your only realistic hope:
Some on-site assistance is needed to press F12 at Bios before Windows XP boot:
A) On PC-A, setup DHCP server that refer DHCP-client to PXE server that download Linux ISO from a web server (of course all three can be a Windows machine in the same LAN segment onsite)
B) reboot PC-B onsite to reboot machine and press F10-F12 to choose Boot-options
C) then choose network-boot (PXE-Boot)
further reading : https://www.vercot.com/~serva/
guide: https://youtu.be/nnxgFpUr1Og?t=39
Note: Make sure you have enabled proxyDHCP and not DHCP Server
I would try with something like these:
Clonezilla, which works by replicating a previously prepared disk image to one or more computers booted inside a network segment
Cobbler, which works like a provisioning server for Linux based machines
Of those options, I have used Clonezilla with success. As long as the prepared base image doesn't change too frequently, the main time consuming tasks would be related with configuring the Clonezilla server and building that seed image.
I did a basic test of Cobbler and it worked fine in my environment, being this a way that would be more apt to deal with requirement changes.
Please also note that both options require some network configuration, like DHCP server settings that work with the PXE protocol.
Also, for your requirement, someone, a human being, would be needed to execute one or more of these tasks:
Properly enable network booting in the BIOS of each of the 800+ machines, unless it has already be done before
Boot the machines to install the new operating system
The network booting option, based on the PXE specification, should be supported by the motherboard of those machines and have higher booting priority than other devices, like CD drives, hard drives, etc.
Another thing to consider for the couple of options I'm suggesting, is how are those 800+ distributed across the country. The more disperse they are, the more cumbersome this task will be. Quite contrary, if there are few places were those machines are located, the more feasible this task will be; for example, by preparing and testing a server, computer or laptop that you then carry to each of those few places and installing the new operating system.
Regarding the option to boot using the public Internet to reach a remote deployment server, I don't know about how that could be done; in fact, for me that would be something quite interesting to learn about. If something like this is possible, another variable to note is the hardware compatibility of the destination machines, because as far as I know, protocols like PXE do some kind of multicast or broadcast in the local network segment and I presume those 800+ machines don't have recent motherboards with advanced firmware that could support more modern boot protocols.
That's all for now.

How to access Internet connected Debian Linux computer through SSH? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I have a BeagleBone Black that is running Debian Wheezy. I want to be able to SSH into it over the internet as long as it is connected to the Internet. I want to be able to type in an URL and be able to access it or deploy software on it.
Many other posts showed how one has to configure the router to forward the port and such. However, I want to be able to take this Beaglebone anywhere, maybe even at a coffee shop with Wifi, and I can quickly access it from another computer through the Internet.
I am wondering what is the best approach to do this. I have my own domain name (provider is Namecheap.com), and I won't mind actually paying for some web hosting services if the solution requires that.
To sum it up, I want to be able to SSH into a Debian Linux system via a domain name without any configuration with the network hardware. I want to be able to quickly set it up and access it as long as the system has internet access. How can this be done?
You need to use a "dynamic dns service", since (most likely) your home ip address is not static. it changes with time, which is why it makes sense to use a domain name. However you can not use a normal dns service, since that updates far too slowly.
You need to configure that dynamic dns service such that it points to the current public ip address of your home router. Typically that is done by a trigger that submits the new ip address as soon as the internet connection has been established. So this has to be done from within your home network, typically by a feature of your router (if offered). Alternatively you can use some utility installed on your boards system that is able to detect its public ip address and when that changes. There are some such utilities in the standard repositories. You can not simply publish your ip every minute or so. It has to be event driven (on connect), or you will probably be blocked by the dynamic dns service.
Then indeed you have to configure port forwarding on your home router. The rule has to forward all incoming requests to a specific port to your boards port 22. Note: do not use port 22 on the outside, so do not forward port 22 to port 22. This works, but you will see constant brute force hacking attacks against your system. Just use something like 50022 or whatever (on the outside!).
That should be all.
I take from your comment that you also want to be able to take that board wherever you go and just use any connection wherever. Such thing is possible, but much more complex. For certain you do need some additional server you have control over. That server has to play relay and forward your requests to your board which establishes an ssh tunnel between that server and itself as soon as it goes online. So you definitely do need some fixed point somewhere. Such a server is no rocket science. You can rent a virtual one for 3-5 Euros a month these days and do with it whatever you want.
The idea here is that your board contacts that server and establishes an ssh tunnel pointing back to its own port 22. Now you can contact the tunnel which is open at the server and your packages will be forwarded through the tunnel to your board. That works, it is a bit slower than otherwise.
In that case you do not need a dynamic dns service, since such a virtual server typically comes with a fixed ip address. So you can simply resolve your domain to that server of yours.
Question in this case is why to do that. Since you already have a comfortable server at your hand, so what is the board for? The only motivation I can think of is to be able to do illegal downloads or hacking attempts in the foreign environment... Which is not an issue in general. Networks are there to be explored. But you clearly should think thrice when you leave the legal ground. Especially about whom you might cause massive troubles :-)
Oh, you could also combine this approach with using your home router instead of a separate server in the internet. Your board can access your home network using the dynamic dns service, contact some system inside your home network which acts just like the rented server described above.
Taking the additional information from that next comment you gave also this might be worth a try, though I am not sure if that will work. You will have to give it a try:
If everyone meant to access the board is within the same local network, then you might get along without the need for port forwarding. You could try to use one of the mentioned dynamic dns utilities to publish your network internal ip address to the dns service. If they accept and publish that address, then everyone should be able to directly access your board inside the local network (so no via the internet), but by using your domain name. I never tried such thing. I could imagine that dns service providers block such thing. But then again, they might not. So it might be worth a try, since it would be a very simple and elegant solution. Also I am not that sure if all systems will accept such an internal address from a dns authority. As said: you will have to try this.
There certainly are more theoretical possibilities, but those certainly are much more complex. If you stay near your board you certainly can also use things like bluetooth or similar. You could bundle a cheap and broken smartphone and use it as a modem, that way the board can act just like the home router above. Certainly you have the option of a wifi ad-hock network connection, but I doubt that is what you are looking for.
One thing I would definitely not do is use a third party service provider specialized in such things. Something like TeamViewer or similar. I consider these a serious and obvious security thread, despite what they claim themselves. You definitely can never trust a closed source or internet only service, since there is simply no way for you do really check what they do. So do not fall for that apparently simple and comfortable solution!

How to install OpenShift Origin on Windows 7? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I am wanting to install OpenShift Origin on my PC running Windows 7.
I am completely new to Linux environments and terminology but wanted to 'look around' the OpenShift product with the hope that I can become familiar with its offerings and features.
So I have started here:
https://www.openshift.com/products/origin
Where the instructions are:
"The easiest way to run OpenShift Origin locally is to download an image suitable for running on a VM. The image will work on KVM , VirtualBox or VMWare . You can also spin up a VirtualBox instance using Vagrant or build your own machine using Puppet".
I have downloaded openshift-origin.latest.tgz and I am assuming the next step is to download and install a 'VM' (something I also have never used)?
I have heard the name VMWare before but when I visit the site there seem to be 15+ different products and I'm not sure which one is required for the above task.
So, is it possible for someone to provide a <ul> of steps required to install and run OpenShift Origin on Windows 7?
A google search for how to install openshift origin on windows 7? does not seem to return any immediately obvious results (the first result links to an article that starts with [obsolete]).
There is a video called 'open shift origin setup' here:
http://youtu.be/rzW3N_C5sIE
But it starts with a file called 'openshift_origin.iso' and not the 'openshift-origin.latest.tgz' that I have downloaded and then it gets into some terminal coding that is completely foreign to me.
Any pointers appreciated.
Edit:
In addition to accepted answer below, as virtual machines may be a bit ominous to newbies here are some screenshots which show the installation of VirtualBox, it was really pretty easy.
For Windows 7, I downloaded VirtualBox 4.2.16 for Windows hosts x86/amd64 from:
https://www.virtualbox.org/wiki/Downloads
and then ran the installer:
Then you will see a few of these type of screens, just click 'Install'.
Unfortunately then when running OpenShift, as per instructions in accepted answer, I got this message:
And I haven't been able to find a workaround to this yet.
But this error shouldn't occur for those who have hardware acceleration enabled.
VirtualBox
VirtualBox is freely available.
Open VirtualBox from the Start Menu - this opens the VirtualBox Manager.
Open the menu File > Import Appliance or press CTRL+I.
Click Open Appliance...
Browse to the folder you downloaded OpenShift Origin to.
Select the .ovf file.
Press Next.
Press Import.
It'll import the file for a while (roughly 2 minutes on my computer) and show up as a Virtual Machine afterwards. You can just click Start and it'll boot up.
VMWare
VMWare Player is free for personal non-commercial use while most other VMWare products are not.
I haven't personally tried this route, but it seems easy enough to just open the .vmx file directly.
Your choices of software to run the ISO (VM image with Fedora) on Windows is VirtualBox or VMWware Workstation. Here's an interesting article that compares the 2:
http://www.infoworld.com/d/virtualization/review-vmware-workstation-9-vs-virtualbox-42-203277
2 unrelated things here...
First, if you do not have a hardware virtualization enabled 64 bit processor (listed as VT-X on Intel chips, and AMD-V on AMD processors), then you cannot host an OpenShift Origin VM, which itself spawns VMs, and thus not only needs the virtualization enabled processor, but needs its VirtualBox VM enabled for virtualization (a checkbox under System/Acceleration in the settings for the VM).
Second, OpenShift Origin relies on multicast DNS, which is not supported on Windows 7, so it won't work.
If you can install Fedora 20 Alpha (I expect Fedora 19 will work, but I haven;t tried it) onto metal, then install VirtualBox and the nss-mdns RPM, that should work.
Been there, done that, got the headache.

Virtual environment for Linux Kernel hacking [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 11 years ago.
This question is to practicing Linux kernel hackers:
Generally, it is best to test/play with linux kernel changes/hacks in a virtualized enviroment.
What virtual environment do you use for testing your hacks?
How do you make a minimalistic filesystem(with basic utils) to use with the environment. If you are using a readymade filesystem, what is that are you using?
Useful heuristics you do with your environment(like installing a new kernel, sharing files etc?
Please provide a step by step procedure to setup the environment, if possible.
A collection of this info doesnt seem available in web.
Thanks.
Different people use different set ups, I don't think there is one true answer.
I currently use VirtualBox as Hypervisor with a file system created with Buildroot.
Apart from other VMs (kvm, qemu, vmware etc.) you could also use User Mode Linux to much the same effect if your hacking is in the more "logical" layers of the kernel.
I'm currently using a Fedora14 VM running in QEMU/KVM on a Fedora14 host for my network driver development. I use a fairly standard install with the Software Development packages, plus whatever web or networking tools (e.g. wireshark) might be useful for the task. I typically set up a serial console on the VM and monitor it with minicom on the host - this helps me catch stack traces when I'm chasing a bug. I usually have my source and editing environment on the host machine with the files on an NFS file system that the VM mounts - this way I don't have to keep copying files to and from the VM. With the host running the same version kernel, I can compile the driver quickly on the multicore host and test it in the VM.

Resources