networking:ip_forwarding
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
networking:ip_forwarding [2025/05/21 09:02] – peter | networking:ip_forwarding [2025/05/21 09:10] (current) – peter | ||
---|---|---|---|
Line 82: | Line 82: | ||
---- | ---- | ||
+ | |||
+ | ==== Ensure persistency ==== | ||
To make sure the new setting survives a reboot, edit the **/ | To make sure the new setting survives a reboot, edit the **/ | ||
Line 104: | Line 106: | ||
- | ===== Make the changes take effect right away ===== | + | ==== Make the changes take effect right away ==== |
<code bash> | <code bash> | ||
sysctl -p | sysctl -p | ||
</ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Troubleshooting ===== | ||
+ | |||
+ | Check the status of sysctl with this command: | ||
+ | |||
+ | <code bash> | ||
+ | systemctl status sysctl | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | The service should say that it is active. If not, start the service with this command: | ||
+ | |||
+ | <code bash> | ||
+ | sudo systemctl start sysctl | ||
+ | </ | ||
+ | |||
+ | |||
+ | On non-systemd Linux installs, checking the status of sysctl will be different. Try: | ||
+ | |||
+ | <code bash> | ||
+ | rc-service sysctl status | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | If IP forwarding is successfully enabled (verified by checking the kernel variable after reboot), but traffic is still not being received on destination systems, check the FORWARD rules of iptables. | ||
+ | |||
+ | <code bash> | ||
+ | iptables -L -v -n | ||
+ | </ | ||
+ | |||
+ | returns: | ||
+ | |||
+ | < | ||
+ | ... | ||
+ | Chain FORWARD (policy ACCEPT 667 packets, 16724 bytes) | ||
+ | pkts bytes target | ||
+ | </ | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | |||
+ | * Check if traffic is reaching the FORWARD chain of iptables by checking the amount of packets and bytes that have hit the chain. | ||
+ | * If none, then there may be some higher rules in the chain that are blocking traffic. | ||
+ | |||
+ | </ | ||
+ | |||
---- | ---- | ||
Line 119: | Line 171: | ||
* TAG: Routing | * TAG: Routing | ||
* TAG: Security | * TAG: Security | ||
+ | * TAG: Server | ||
+ | |||
+ | ---- | ||
+ | |||
networking/ip_forwarding.1747818134.txt.gz · Last modified: 2025/05/21 09:02 by peter