Skip to main content
Version: 7.24

settings


ip/settings

Type: Settings Directory

This menu allows you to configure various IPv4 and IPv6-related kernel and system-wide network parameters. These settings control how the operating system handles IP traffic and network communications.

ArgumentTypeDescription
ip-forwardboolEnable or disable packet forwarding between interfaces. Resets all configuration parameters to defaults according to RFC 1812 for routers.
send-redirectsboolSend ICMP redirects. Enable this on routers.
accept-source-routeboolAccept packets with the SRR option. Accepting source-routed (SSRR/LSRR) packets is a well-known spoofing/security risk and should be kept disabled unless required by the setup.
accept-redirectsboolAccept ICMP redirect messages. Enable on hosts and disable on routers.
secure-redirectsboolAccept ICMP redirect messages only for gateways listed in the default gateway list.
rp-filterenum (no | strict | loose)

Enable or disable source validation.

  • no - Do not validate source addresses.
  • strict - Strict mode as defined in RFC 3704 Strict Reverse Path. Each incoming packet is tested against the FIB and if the interface is not the best reverse path, the packet check will fail. By default, failed packets are discarded.
  • loose - Loose mode as defined in RFC 3704 Loose Reverse Path. Each incoming packet's source address is tested against the FIB and if the source address is not reachable through any interface, the packet check will fail.

RFC 3704 recommends enabling strict mode to prevent IP spoofing from DDoS attacks.

If you use asymmetric routing, complex routing, or VRRP, then strict mode will cause problems, enable loose mode instead.

ipv4-multipath-hash-policyenum (l3 | l4 | l3-inner)

IPv4 hash policy used for ECMP routing.

  • l3 - Layer-3 hashing of source and destination IP addresses.
  • l3-inner - Layer-3 hashing, or inner layer-3 hashing if available.
  • l4 - Layer-4 hashing of source and destination IP addresses, IP protocol, source port, and destination port.
tcp-syncookiesboolSend syncookies when the SYN backlog queue of a socket overflows. This helps prevent SYN flood attacks. However, syncookies violate the TCP protocol and prevent the use of TCP extensions, which can degrade some services (for example, SMTP relaying). This degradation may be visible to your clients and relays contacting you.
tcp-timestampsenum (disabled | random-offset | enabled)Enable or disable TCP timestamps, or add a random offset to TCP timestamps (default behavior). Disabling timestamps can help reduce performance drop spikes.
max-neighbor-entriesnum

Sets Linux gc_thresh3. A maximum number of allowed neighbors in the ARP table. Default value depends on the installed amount of RAM. It is possible to set a higher value than the default, but it increases the risk of out-of-memory condition. The default values for certain RAM sizes:

  • 2048 for 64 MiB,
  • 4096 for 128 MiB,
  • 8192 for 256 MiB,
  • 16384 for 512 MiB or higher.

The ARP cache stores ARP entries, and if some of these entries are incomplete, they can stay in the cache for an indefinite period of time. This will only happen if the number of entries in the cache is less than one-fourth of the maximum number allowed. The reason for this is to prevent the unnecessary running of the garbage-collector when the ARP table is not close to being full.

arp-timeouttimeSets Linux base_reachable_time (base_reachable_time_ms) on all interfaces that use ARP. The initial validity of the ARP entry is picked from the interval [timeout/2 - 3*timeout/2] (default from 15s to 45s) after the neighbor was found. Can use postfix ms, s, m, h, d for milliseconds, seconds, minutes, hours, or days. If no postfix is set then seconds (s) are used. The parameter means how long a valid ARP record will be considered complete if no one communicates with the specific MAC/IP during this time. The parameter does not represent a time when an ARP entry is removed from the ARP cache (see max-neighbor-entries setting).
icmp-rate-limitnumLimit the maximum rates for sending ICMP packets whose type matches icmp-rate-mask to specific targets. Value of 0 disables any limiting, other values indicate the minimum space between responses in milliseconds.
icmp-rate-masknumMask of ICMP types for which rates are limited. For more information, see the Linux man pages.
icmp-errors-use-inbound-interface-addressboolWhen enabled, send ICMP error message replies with a source address equal to the primary address of the receiving interface that caused the error. Use this for complex network debugging.
ipv4-high-fragment-threshnum

Sets the upper bound of memory (in bytes) the kernel may consume for all fragment reassembly queues combined (every interface and every flow). When the total memory used by the cache reaches this limit the kernel starts dropping newly arriving fragments, causing packets to be discarded. Raising the limit reduces the chance of drops under heavy fragmentation (e.g. high-throughput links with VPNs, or MTU-limited paths), but it also raises the maximum amount of RAM that can be used.

The default value depends on the installed amount of RAM:

  • 512 KiB for 64 MiB of RAM,
  • 1024 KiB for 128 MiB of RAM,
  • 2048 KiB for 256 MiB of RAM,
  • 4096 KiB for 512MiB of RAM,
  • 16 MiB for 1 GiB of RAM,
  • 32 MiB for 2 GiB of RAM or higher.
ipv4-fragment-timenumTime in seconds to keep an IPv4 fragment in memory.
allow-fast-pathboolAllows Fast Path
Read-only ArgumentTypeDescription
ipv4-fast-path-activeboolIndicates whether fast-path is active.
ipv4-fast-path-packetsnumAmount of fast-pathed packets.
ipv4-fast-path-bytesnumAmount of fast-pathed bytes.
ipv4-fasttrack-activeboolIndicates whether fasttrack is active.
ipv4-fasttrack-packetsnumAmount of fasttracked packets.
ipv4-fasttrack-bytesnumAmount of fasttracked bytes.