Add separate docs for routed and ebtables setup

Remove further info and implementation details of ip-less-routed
and private-filtered setups from main page. Introduce routed and
ebtables page to include all this info.

Add /etc/network/interfaces examples for ip-less-routed
configuration.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Fix some typos

..and use upper case for all acronyms (NIC, TAP, DNS, SSH, RDP).

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
docs: Big refactor

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Add comments to iptables

Depending on each rule reason we add a relevant comment prefixed
with "snf-network_".

Currently we have three reasons: firewall, proxy-arp, extra.

Additionally save all rules under /etc/iptables/ at the end of
ifup-extra script. This can be used to restore some rules after
reloading ferm.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Fix typo in clear_bridged_setup_firewall

Use $oldchain instead of $chain.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Run snf-network-dnshook only in primary node

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Use hostname -f to get node FQDN

Ganeti exports node names with their FQDN. Use hostname -f
to compare the exported variables and decide whether to execute
the hook or not.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Try clean anything in ifdown

..and don't count on tags, etc. This should work on a best effort
basis.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Fix snf-network-hook

..to delete neighbor proxy only:

1) in old primary node during instance migrate/failover
2) in primary node during instance shutdown/remove

Please note that this is done also by kvm-ifdown-custom.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Fix typo in delete_neighbor_proxy()

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Several syntax fixes in docs

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Do nothing in ifup-extra

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Backup iptables, arptables, ebtables commands

For each interface create a file named e.g., tap1 under
/var/lib/snf-network/. This file will include all important
variables related to the interface (INSTANCE, IP, EUI64, etc.) and
then all iptables, arptables and ebtables commands that snf-network
has invoked while configuring it. This can be helpful for admins
while reloading ferm rules or for debugging purposes.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Use env var for state dir

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Merge branch 'develop' into debian-develop
Add /var/lib/snf-network STATE_DIR

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Execute command after logging it in state dir

This was forgotten when log helper function was introduced.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Introduce log and save functions

The save() function is used in order to save and backup
iptables/arptables/ebtables commands related to each interface.

The log() function is a wrapper of snf-network-log script.

Do not use a default variable for the log script. This could
cause a fork bomb if the admin forgot to define it.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Merge branch 'develop' into debian-develop
Remove SNF_NETWORK_LOG from defaults

..and add some comments to other variables.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>