Specifying both IPv4 and IPv6 IP types in akamai.EdgeHostName - akamai

Pulumi recently updated their Akamai package. There's a new property when creating an EdgeHostName resource called ipBehavior. What do I put as the value for this property when I need the EdgeHostName IP Type to be IPv4 + IPv6? I've attached a screenshot of the desired IP type on the Akamai Property Manager Editor.

I believe the possible values are IPV4 for version 4 only, IPV6_PERFORMANCE for version 6 only, or IPV6_COMPLIANCE for both 4 and 6.

Related

Change IP address of cloned VM - RedHat

I cloned a RedHat OS VM using VMSphere Client and the IP address is now the same on both VMs. How can I set/change the IP address of the cloned VM? I've checked several sources but couldn't see any resolution to this problem eg. http://discussions.citrix.com/topic/237224-changing-ip-address-after-cloning-vm/
This question would be better for ServerFault.
With that said, if the address is static, you will need to update your interface configuration file. Use the ifconfig command to determine the interface name, this will be $interfaceName. You will now need to update the ip address in the /etc/sysconfig/network-scripts/ifcfg-$interfaceName. You want to update the IPADDR field. See the Redhat docs here: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/s1-networkscripts-interfaces.html.
VMware does not handle the IP addressing, the VM will handle this itself. The reason you have the same IP address is because the file is exactly the same on both VMs. You will also need to update the MAC address in VMware under the network settings tab.
Edit:
From the VMware KB, "The /etc/udev/rules.d/70-persistent-net.rules may also need to be updated to the new MAC address." -http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2002767
I set BOOTPROTO=dhcp and ONBOOT=yes from /etc/sysconfig/network-scripts/ifcfg-eth0 followed by service network restart and that set a new IP address to the VM.

How to Know an IP Address is Local or not on Linux Server

We are developing a Server software on Linux using C/C++, this software will limit the download rate for those requests which are from the Internet, but for those from local machines (intranet) it won't set any limit.
The problem is how to judge an IP address is local or not, is it possible to do it through c/c++ by reading some network number settings (maybe from router?)?
UPDATE
When I say local ip, I mean it is from within the company. For example, suppose the company has three subnets (this company only has a DSL link to the internet), they are 10.123.1.xxx, 172.16.1.xxx and 192.168.1.xxx, then all ip addresses from these three subnets should be considered as local address.
The private address ranges are:
10.0.0.0 - 10.255.255.255 (10/8 prefix)
172.16.0.0 - 172.31.255.255 (172.16/12 prefix)
192.168.0.0 - 192.168.255.255 (192.168/16 prefix)
You might also want to filter out link-local addresses (169.254/16)
You could then parse the ip address in your code(to get the addresses you could use avahi or something similiar and save all the addresses to a file and then parse each address individually)and check it matches these addresses. If it does not then limit its connection
Edit
You could also look into using the getifaddrs function that will list local addresses
If you run a traceroute on the IP address of the machine requesting a connection, you should be able to see whether the route takes you through the "gateway outside the company" (typically your ISP). A simple example in my house would be the Time Warner gateway that my internal router connects to. If the route to the client does not go through the ISP (as you mentioned, you have a DSL link; so the IP address of the DSL endpoint should be known), then it's an internal request. This doesn't require you to know the full map of IP addresses inside the company - you can assume your routers have it figured out.
To get this information you can run a system command from inside your program and parse the response.
To start with, run it from the command line (with a known "internal" and "external" IP address), and look at the difference. If you need further help after that, please update your question with the information you gathered.

Libcurl: force ipv4 or ipv6

How do I force libcurl to access a server running in dual stack mode over either ipv4 or ipv6? It shouldn't be hard to do using IPs addresses, but I'm looking for something that works with DNS ...
You bet. The config CURLOPT_IPRESOLVE which can be set to CURL_IPRESOLVE_V4 or CURL_IPRESOLVE_V6.
A more robust solution, if you can control DNS in anyway, is to make an A record for the v4 address and a separate AAAA record for the v6 address. This would let you pick the network you want to poll this system by, regardless of DNS resolution. But CURL can do what you want, just fine.

How to get my computer external IP address?

Lets say my IP currently is: 123.123.123.123
How can I get that string programmatically?
Note: I don't want to get this IP: 192.168.0.10, I want that IP which others can use to connect into my computer via HTTP or anything.
NOTE: I dont want to open some web-page such as ip4.me to get the address, I want to get it with just C++.
I tried to google but every suggestion was "load a page and read the IP it tells you". Is that really the only way?!
You can fetch it from http://api.externalip.net/ip/ or some similar services, but I'm not sure how reliable these sites are, in means of availability
Any other way would be extremely complicated, as in general, no network equipment has api to tell external IP, and even if it had, you can not tell is there a simple xDSL router in front of you or Cisco ASA nating outbound traffic
My recommendation is to send a packet with the record route option.
If you know your upstream gateway, you should be able to find a ping command that allows you to set record route, and then either stores that data in an array or something you can regex.
Your WAN IP should be either record 0 or record 1, I believe.
What network library are you using?

GNU/Linux: getting value of option 15 of DHCP without using `getnameinfo`

My GNU/Linux machine is connected to a DHCP. I want to retrieve the value of the option 015 of DHCP (DNS Domain Name), but without using getnameinfo, since it is using DNS in order to retrieve domain name.
How can I do that with C/C++?
My dhclient writes a pile of lease information into /var/lib/dhcp3/dhclient-[uuid]-[iface].lease files. I haven't got a clue what the uuid in those filenames represents, but it does report the different options from the dhcp server.
Fore SUSE: DHCP options are written in /var/lib/dhcpcd/dhcpcd-eth[x].info