0
0
Fork 0
easterhegg-2005-website/noc/configs/network/if-up.d/ip

19 lines
535 B
Bash
Executable file

#!/bin/sh
# This should probably go into ifupdown
# But usually only those with lots of interfaces (vlans) need these
if [ -d /proc/sys/net/ipv4/conf/$IFACE ]
then
if [ -n "$IF_IP_PROXY_ARP" ] && [ "$IF_IP_PROXY_ARP" -eq "1" ]
then
echo 1 > /proc/sys/net/ipv4/conf/$IFACE/proxy_arp
else
echo 0 > /proc/sys/net/ipv4/conf/$IFACE/proxy_arp
fi
if [ -n "$IF_IP_RP_FILTER" ] && [ "$IF_IP_RP_FILTER" -eq "0" ]
then
echo 0 > /proc/sys/net/ipv4/conf/$IFACE/rp_filter
else
echo 1 > /proc/sys/net/ipv4/conf/$IFACE/rp_filter
fi
fi