Hcloud Classic Network Manager
-
Features
- Subnet Management
- Master Node DHCP Management
- Configure network interfaces of Master Node
- Allocate Adaptive IP (Allocate public IP address to private IP address.)
-
Supported OS
- Linux
-
Pre-required
- SELinux disabled (If enabled, iptables will not work correctly.)
- If you have apparmor installed, you should add an allow line to apparmor config.
WARNING: If you make harp config directory as a symbolic link, you must also allow the target directory.
- vi /etc/apparmor.d/usr.sbin.dhcpd
/etc/hcc/harp/dhcpd/config/*.conf lrw,
- Restart apparmor
service apparmor restart
- iptables installed with NAT kernel module loaded (iptable_nat, nf_nat)
- Golang installed
- 2 network interfaces for use an external network and internal networks.
- How to build
- Just run
make
command.
- Just run
-
How to run
- Copy
harp.conf
andharp_adaptiveip_network.conf
to/etc/hcc/harp/harp.conf
- Change your settings in
harp.conf
andharp_adaptiveip_network.conf
- Run
harp
binary.
- Copy
-
How it allocates public IP addresses.
- Get server's UUID and public IP address from user.
- Check if provided server's UUID is already used in Adaptive IP.
- Get the private subnet information related with sever.
- Get the first IP address. (End with x.x.x.1. This is Leader Node's IP address.)
- Create NAT firewall rules.
- Server's nodes are now connect to Internet and can connect from external network by provided public IP address.
-
How it listing available public IP addresses.
- Make a array from start IP address to end IP address that configured as Adaptive IP range in
harp.conf
. - Check from start IP address to end IP. First, check if the IP address is configure to external network interface.
- Second, send ARP request. If it received ARP reply, then the IP address is duplicate with someone.
- Show the available IP addresses except in 2 and 3 .
- Make a array from start IP address to end IP address that configured as Adaptive IP range in
- See configuration comments in
.go
files located in./lib/config/
.