How to set ip for vm from outside [closed] - virtualization

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I need to set ip from outside of virtual machine.
Now we use dhcp server to bind static ip with their MAC.
But when the number of vms is larger and large, that's not easy for administer.
I want to make one interface for the clients to set the ip of the vm when creating it.
By now, i know i can mount the vm disk and config the network setting before creating the vm.
there is one problem for that, the vm disk type may be various, and sometimes they may have totally different partition structure, and may be including LVM,etc. Besides this, i don't know whether it is possible to config ip for Windows operating system with this method.
I don't know how they do this, i mean those Virtual-machine product, like Vmware.
Edit:If those virtual-machine product don't give one interface for client to set ip for vm, then how they manage their ips. we have many many vms, and we specify ip for each of them, the client just use it, they are not authorized to set their ip from within the os, though set, it won't make any sense, they will can't connect to the internet.
I think there must be one approach for this.
Thanks, any help is appreciated.

First of all VMWare does not provide a way to set the IP for the host from it's interface. At least not a general way. If you really want to modify the guest filesystem have a look at libguestfs which provides tools and an api to modify guest images.
You may also want to have a look at foreman smart proxy to manage/control your dhcp server via a REST api. If you use directly theforeman it will allow you to manage the ip addresses via a webui.

Related

Kubernetes DNS names, Certificates, LB Design Question [closed]

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 17 days ago.
Improve this question
I would like to ask what strategy to use in Kubernetes for Ingress Controllers, DNS names, certificates and apps. Not asking for technical details but more about the modeling. I have searched for recommendations on this and struggled.
Q1: Use one OR multiple Load Balancers? When would you spin a new LB - is it based on security, traffic, something else?
Q2: Lets say I have 3 Business Units and each of them have 2 Apps, what is the best way to go about DNS names and certificates?
Use separate certs and DNS names for every App ==> 6 Certs, 6 DNS names (bu1app1.company.com, bu1app2.company.com,bu2app1.company.com, bu2app2.company.com,...)
Use a cert per BU (DNS name for each BU BUT not each App) and then use path based routing for the Apps under that BU ==> 3 Certs, 3 DNS names (bu1.company.com/app1, bu1.company.com/app2, bu2.company.com/app1, bu2.company.com/app2,...)
Use a single cert for all BU (single DNS for All) and then use path based routing for every BU and app ==> 1 Cert, 1 DNS name (k8s.company.com/bu1app1, k8s.company.com/bu1app2, k8s.company.com/bu2app1, k8s.company.com/bu2app2,...)
Any advice is appreciated.
Jake.
Q1: Use one OR multiple Load Balancers? When would you spin a new LB - is it based on security, traffic, something else?
It depends on your application architecture, number of locations you are serving, etc. There are multiple types of load balancers available like internal load balancers, external load balancers, global load balancers, network and application load balancers etc., if your application is very big, instead of having a single machine serving your entire application you can split the application into multiple groups based on their functionality and have a load balancer configured for each group based on the traffic or hits they are receiving.
Q2: Lets say I have 3 Business Units and each of them have 2 Apps, what is the best way to go about DNS names and certificates?
Again it depends on the type of business each of your units is handling. If all the three units are doing the same business but targeting different audience then you can have a single DNS and a certificate. If your three units are doing distinct it’s always suggest to go with distinct dns names in order to reach the targeted consumers.
Eg: If your’s is a food delivery application and you have two units one which serves all the customers and one which serves only b2b customers, here you can have a single domain name and one sub domains namely
fooddelivery.com &
b2b.fooddelivery.com

Finding IP of servers [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 8 years ago.
Improve this question
I am learning about sockets and client-server applications. It seems as if the recommended approach is that the server should have a fixed IP address so that the client can find it. Is this correct? It seems as if there should be some type of startup technique where on initialization a program on the server (or the client) could generally broadcast their IP addresses to the other computers on the network, so that in case the server IP address changes the clients can still find it. Is this possible? I believe that "multicast" may be helpful, but it seems as if that is not always supported and/or the routers/switches must be configured to accept this or the technique would fail. Is this correct? I see that there are ways to perhaps use UDP to broadcast to any computer on the network, but it's not clear to me how the recipient computers can access this in a clear manner without a socket already set up - wouldn't there be confusion if other computers are already broadcasting on the same port? Is it just a protocol issue for the program to sort out to recognize the received packets? Do I just need to learn more about sockets? Any and all suggestions/pointers for where I could look would be greatly appreciated. Thanks so much in advance!
I am learning about sockets and client-server applications. It seems
as if the recommended approach is that the server should have a fixed
IP address so that the client can find it. Is this correct?
Yes, it is.
It seems as if there should be some type of startup technique where on
initialization a program on the server (or the client) could generally
broadcast their IP addresses to the other computers on the network, so
that in case the server IP address changes the clients can still find
it. Is this possible?
Yes, it is.
I believe that "multicast" may be helpful, but it seems as if that is
not always supported and/or the routers/switches must be configured to
accept this or the technique would fail. Is this correct?
No, multicast is not really helpful here, you mentioned why, and you should know multicast address in advance.
I see that there are ways to perhaps use UDP to broadcast to any
computer on the network, but it's not clear to me how the recipient
computers can access this in a clear manner without a socket already
set up - wouldn't there be confusion if other computers are already
broadcasting on the same port?
You just advertise your clients once in a while, for example every 5 secs or every 1 min, whatever interval you find ok. If someone sends on this port too - then you should use some unique structure, magic numbers and so on to distinguish one packets from another.
Is it just a protocol issue for the program to sort out to recognize
the received packets?
Yes, it is. On UDP.
Do I just need to learn more about sockets?
Absolutly yes. I suggest this book: Unix Network programming, it is good, even if you running non-UNIX environment.

How will you identify if this is web server / code / vm shortage [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
given a whole picture first.
In a Oracle VM box, I've installed a WinXP pro(x32) and a Web server. The web server's web root, CGI scripts, and interpreter are mounted from share folders from my host computer(my real C drive), which the folders are read-only.
My problem is, when I create any (CGI) web pages with frames (or iframe), it happens to throw Error 500 in random frame (even I run the page from localhost), but if I reload the frame, or reloads the whole page, it can go normal again (this also happen a first ok frame go error after reload the whole page). And I've checked very carefully, there's no problem for my script. btw, I use Perl for my CGI scripts.
So I suspect there might be some problem along the "traffic" though in the same machine, but I don't know if this can happen if I call the same module among those different frames. Anyone experience similar situation or relative information? or if any test plan you would suggest me to do? I am recently using Abyss x1 as my web server, but I tried Apache also, and same thing happens
Thanks in advance
Windows XP does not allow more than 10 incoming connections and is therefore not a good operating system on which to install a web server.
Note For Windows XP Professional, the maximum number of other computers that are permitted to simultaneously connect over the network is ten. This limit includes all transports and resource sharing protocols combined. For Windows XP Home Edition, the maximum number of other computers that are permitted to simultaneously connect over the network is five. This limit is the number of simultaneous sessions from other computers the system is permitted to host. This limit does not apply to the use of administrative tools that attach from a remote computer.
Thanks Amon and Sinan, that gave the clues. These 2 are reasons why this happen ( only don't sure if they are all the reasons). Since the interpreter and underlying modules also calling from host machine, which is quite expensive. After I installed a Perl(and modules) inside my VM. This problem won't happen again!

How do I make my xampp server public using my public ip address? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I have just installed xampp 1.7.7. I need to know what I need to do in order to make my website public using my public IP address (not 192.168.xxx.xxx) Also, I am behind a router (NETGEAR WPN824v3). I do have a dynamic IP address, but I have reserved the IP via my router. My operating system is Windows 7 Professional x64.
Do I need port forwarding? --> If so, what is the server IP (won't let me choose anything besides 192.168.xxx(cannot change).xxx(needs to be entered manually))? and what is the start port and end port?
What other changes do I need to make to make my website public without using:
127.0.0.1, 192.168.xxx.xxx,localhost,etc....
How do I configure a domain name (from DOT TK)?
Please give me a step-by-step detailed list of instructions on how to do this and don't refer me to other websites please!
Q: This sounds like a home network, correct?
Q: Do you have a registered domain? Or do you want people to access your site by IP address?
Your internal, LAN address is 192.168...
You can find your external ("WAN") address by looking at your router (which may be the Netgear, or might be yet another router - the one built in to your DSL or cable modem).
You can also find it by pointing your browser here:
http://www.whatismyip.com
Be advised that, unless you have a "static IP" from your provider, this external address might change at any time. It might stay the same for months ... or it might change multiple times/day. "It depends".
Be advised, too, that the moment you open anything on your firewall - especially a web site - you leave yourself potentially vulnerable to hackers. You absolutely need to make sure you have adequate security in place to protect against this eventuality.
Suggestion: look at DynDNS (or alternatives):
http://www.dyndnscommunity.com/
Or just shop around for a web hosting service that appeals to you :)
How do I register my domain(I don't want to use an ip address for my
name)
http://www.no-ip.com/ (free)

How do you protect your commercial application from being installed on multiple computers with one license? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 9 years ago.
Improve this question
How do you protect your commercial application from being installed on multiple computers from people who only own one license?
Do you think it's a good idea to have more than just a serial based scheme?
My general rules are
Huge deployments in commercial environments - Audit
Medium deployments of low value software < $1000 / seat - License key activation
Small deployments of high value software > $10,000 / seat - Dongles
The following method works well, as long as you have a public server at your disposal:
Serial based protection, user must enter a serial before using the program
On first serial entry, bind the serial to the MAC address and create an auth code generated from both of these values.
Check with your server to make sure the serial and MAC can be bound to eachother. Register the MAC on the server.
On each subsequent run, never contact the server again, but each time make sure the serial + MAC address matches their auth code.
If the user has no MAC address, allow them to run the program as long as they have a serial.
This gives you protection against someone simply copying the registry from one computer to another.
If the user tries to install with the same serial on another computer, the server will not allow you to bind the serial number to the MAC address because it is already bound.
It is not a perfect solution but it protects you 99% of the time.
Do you think it's a good idea to have more than just a serial based scheme?
Speaking as someone who has to install all kinds of software on all kinds of machines, do please spare a thought for the poor network administrators when thinking up your copy protection scheme. Please, please, consider network-wide installs when writing your installer - by all means include some kind of serial number protection, even make me phone up or contact your website and get an authorisation code to get a site-wide installer code or whatever, but please make sure your licensing code works. A good way to ensure your technically-superior-to-anything-else-on-the-market software doesn't get installed and used is to mess up the installer or have an install system that is simply too much trouble.
Use machine-locked licenses or licenses requiring activation to lock licenses to specific machines. Instead of developing such a scheme yourself, consider using a ready-to-use one like CryptoLicensing which supports these features.
DISCLAIMER: I work for LogicNP Software, the developer of CryptoLicensing.
We use a MAC address plus license file approach. We have the customer send us the MAC address of their PC, then generate a license file based on that MAC address. We then send the file to them via email and then they load the license file into the program. The downside is that if people swap out network cards and you'll have to issue them a new license. It takes a little more bookkeeping to make sure people aren't always requesting new licenses, and a little trust in your customer base that they won't try to game the system too much. Depending on that trust level, you can add layers of encoding or encryption into the file so they can't easily duplicate the file. On the plus side, you don't have to implement or maintain any type of authentication server.
You can always use a USB dongle if the software is worth it. Of course, all dongle manufacturers claim that their copy protection cannot be broken.
The advantage of this method is that it allows the user to use the software on multiple computers, but only run on one at a time, and it is actually not such hassle like some sort of product activation. The disadvantage, of course, is that you cannot deploy your application completely electronically. Even though you might think the opposite, actually many customers seem to accept the use of a dongle, at least in the field I work in. It's especially useful if you expect your customers to use (and also install!) the software in a place where no internet connection is available.
Edit: I overread the serial-based thing in the original question. Note that even that may annoy users more than having to put in a dongle, and it's easier for you too because neither the customer nor you have to deal with that numbers. Plug in the dongle and the app works. However, the serial-only method is by far the cheapest.
We use Orion from Agilis. For some of our users we do activation of node-locked licenses, for others they get their activation by a web page or email, and for others we put a license server on their premises. Orion covers all the bases we need.