mirror of
https://github.com/DrHo1y/orangepi-build.git
synced 2026-11-23 10:32:45 +07:00
Update orangepi-config
This commit is contained in:
3
external/cache/sources/orangepi-config/debian-config-jobs
vendored
Normal file → Executable file
3
external/cache/sources/orangepi-config/debian-config-jobs
vendored
Normal file → Executable file
@@ -649,6 +649,9 @@ function jobs ()
|
||||
echo 1 > /proc/sys/net/ipv4/ip_forward
|
||||
# Clear iptables
|
||||
iptables-save | awk '/^[*]/ { print $1 } /^:[A-Z]+ [^-]/ { print $1 " ACCEPT" ; } /COMMIT/ { print $0; }' | iptables-restore
|
||||
if [[ ${DISTRIBUTION_CODENAME} == buster ]]; then
|
||||
echo 1 | update-alternatives --config iptables > /dev/null
|
||||
fi
|
||||
# - Apply iptables
|
||||
iptables -t nat -A POSTROUTING -o $DEFAULT_ADAPTER -j MASQUERADE
|
||||
iptables -A FORWARD -i $DEFAULT_ADAPTER -o $WIRELESS_ADAPTER -m state --state RELATED,ESTABLISHED -j ACCEPT
|
||||
|
||||
Reference in New Issue
Block a user