-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CloudStack acquire Public IP address #87
Comments
Hi. Cheers, |
What do these 3 variables actually do? Could You please explain in more detail? I have an idea but not 100% sure.
|
The difference between Now regarding the specific variables you mention:
Hope this helps. Let me know if you have anymore questions. |
Thank You for Your explanation. But isn't static_nat variable the one that I need to acquire a public address? Link You provided says - maps a public IP address to the private IP address of a VM in order to allow Internet traffic into the VM... |
I can't be sure about Basic networking because I've never used it, nor do I have a way to test against it. In the case of Advanced networking, you do need to have acquired an IP in a network before you can enable the static NAT on it. |
My network type is advanced, but IF I set cloudstack.network_type = "advanced" ,then I get an error message with no further explanation (even in debug mode)
I have 3 different network offerings and they all are enabled and also I don't understand where does the plugin get this id=8, i don't have it set anywhere. |
It might be that the API is case sensitive. Have you tried |
I have tried both, but it seems to be ignoring it at all if I type it with a capital letter. |
What do you mean by ignoring it at all? |
It acts like i have just commented it out if I set cloudstack.network_type = "Advanced" but if I set cloudstack.network_type = "advanced" with a small letter, then it throws an error mentioned above.
Also, this is not working - cloudstack.expunge_on_destroy = "true" how should it be set correctly? |
To me that means that the correct setting is The expunge option takes a boolean, so you should set it like |
Okay, with the configuration above (changed network_type to Advanced with capital), it creates the VM as before, but it tries to connect to non-public IP address - for example 10.1.1.208, is it possible to attach a public IP as well? |
So what you need to do is to acquire a public IP in cloudstack (because the vagrant-cloudstack does not do that for you) and configure that in your vagrant file. Assuming the public IP you acquired is A.A.A.A, your vagrant file should include the following configuration: cloudstack.pf_ip_address = "A.A.A.A"
cloudstack.pf_public_port = '2222'
cloudstack.pf_private_port = '22' I would recommend that you set the cloudstack.pf_ip_address = "A.A.A.A"
cloudstack.pf_public_port = '2222'
cloudstack.pf_private_port = '22'
cloudstack.pf_open_firewall = false
cloudstack.firewall_rules = [
{
ipaddress: "A.A.A.A",
cidrlist: "B.B.B.B",
protocol: 'tcp',
startport: 2222,
endport: 2222
}
] |
Did it but it still acquires only the non-public IP (e.g. 10.1.1.240), cant seem to find the right config, I did it as you told:
|
Can anyone comment on my config? Help with this setup? Please, any help will be appreciated. |
Hi @ezisezis The config you posted has a few problems, namely with the IP addresses. And again, vagrant-cloudstack will not acquire the IP for you. You need to that yourself before running vagrant. |
Obviously I am using valid IPs but I dont want to show them to everyone. I acquire an IP myself, all I want vagrant to do is to bind it to my newly created server whitch it does not do. |
Well, I guess you have also acquired a public IP and configured that in your vagrant file? Can you please post the output of vagrant? |
Exacly. Lets say i have acquired an IP of 2.2.2.2 (A.A.A.A) and my public IP from which I want to access the server is 3.3.3.3 (B.B.B.B), but vagrant does not bind this 2.2.2.2 IP to server, it tries to SSH to non-public IP (e.g. 10.10.1.220). |
Can you post the output of |
And it continues to try to connect to a local IP but I cancel it with Ctrl + C |
The last example I sent you was using a notation for expressing hashes that the plugin does not seem to recognise. Can you try to change you config to be like this: cloudstack.firewall_rules = [
{
:ipaddress => "A.A.A.A",
:cidrlist => "B.B.B.B/32",
:protocol => 'tcp',
:startport => 22,
:endport => 22
}
] |
At last I managed to do it with port forwarding. I had to update the cloudstack plugin that i hadn't done (oops) and change the network service offering to the one with port forwarding enabled. Thank You for the help. One more question - is it possible to configure vagrant to add another IP with static NAT and withOUT port forwarding? |
It is possible to enable static NAT on an existing IP, but like before you will have to acquire the IP yourself. cloudstack.static_nat = [
{ :ipaddress => "A.A.A.A"}
] |
Seeing the age of this thread and different questions and solution, I'm closing this. |
Hey, is it possible for this plugin to acquire public IP address automatically to access the box via SSH later? If I just point the config to network "test' who has several acquired public IP`s, one of them being 22.22.22.22 for example, how can I get my box to use this IP and open SSH firewall from my ip(33.33.33.33) to it? My Vagrantfile now:
The text was updated successfully, but these errors were encountered: