Linux as router
- eth0: WAN
- eth1: LAN
Enable IP Forwarding
sysctl | |
---|---|
/etc/sysctl.conf
:
sysctl.conf | |
---|---|
sysctl | |
---|---|
IPTables Configuration
rules
iptables | |
---|---|
Save/Persist iptables rules
- To save the iptables rules, you can use the following command:
iptables - To restore the iptables rules on boot, you can use the following command:
iptables - To make the iptables rules persistent across reboots, you can install the
iptables-persistent
package:apt - During the installation, you will be prompted to save the current iptables rules. Choose "Yes" to save them.
- After installation, the iptables rules will be automatically restored on boot.