Today's computer machines are now equipped with multiple network interface. Hence, when these interfaces are connected to the same network, they are always allocated into individual IP-bind and work independently instead. That also means a machine (host) can be identified with multiple IP addresses across a network. This is not feasible. This section guides you on how to harden Debian by configuring the multiple network interfaces into a single bonded interface.
These are the identified threats related to Debian Software.
By default, Debian does not ignore ICMP requests for broadcast addresses (ranged .255 types).
By default, Debian allows ICMP requests for unicast addresses (direct ping).
By default, Debian does not ignore bogus ICMP reponses.
By default, Debian accepts ICMP redirects.
By default, Debian send ICMP redirects.
By default, Debian forwards IP packets.
By default, Martian Packet (usually caused by bad routing) are not logged.
For machine with multiple network interfaces, the network topology must be reviewed for strong-end host model configurations.
By default, Debian does not setup firewall software and its policy.
By default, Debian is configured to operate using ARP packet to identify local area peers.
Here are the list if actions to counter the issues.
The first thing to do is to harden the network by creating /etc/sysctl.d/harden-networking.conf
.
Among the recommended settings are:
# Ignore ICMP broadcasts
net.ipv4.icmp_echo_ignore_broadcasts = 1
# Ignore bogus ICMP errors
net.ipv4.icmp_ignore_bogus_error_responses = 1
# Do not accept ICMP redirects (prevent MITM attacks)
net.ipv4.conf.all.accept_redirects = 0
net.ipv6.conf.all.accept_redirects = 0
# Do not send ICMP redirects (we are not a router)
net.ipv4.conf.all.send_redirects = 0
# Do not forward IP packets (we are not a router)
net.ipv4.conf.all.forwarding = 0
net.ipv6.conf.all.forwarding = 0
# Log Martian Packets
net.ipv4.conf.all.log_martians = 1
Depending on necessity, after the configurations are created, one can either:
$ sysctl -p
" as root to reset the kernel settings.Review the role of the machine (gateway, bridge, router, load-balancing) for possible strong-end host requirement. If yes, configure the network topology accordingly using ifenslave (Deploying Strong-End Host Network).
One must review necessity for implementing static ARP for this machine.
Then, he/she must review the local area network topology and identify important machines with its mac address and check the possibility of assigning static/reserve IP to those important machines. The outcome is to obtain a list of <MAC> <IP> binding.
Then add the MAC-IP relationship into /etc/ethers
(create one if not exists) as follows:
<MAC> <IP>
XX:XX:XX:XX:XX:XX 192.168.XXX.XXX
XX:XX:XX:XX:XX:XX 192.168.XXX.XXX
...
Once completed, he/she can do "$ arp -f
" to pick up local ARP cache.
Additionally, one can ensures applications or services uses some kind of secured authentication to differentiate MitM attackers from pro-bono correspondents.
That's all for hardening Debian by configuring hard-end network