mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
293 B

  1. public_forward() {
  2. if [ "$if" != "none" ]; then
  3. error "Keyword >>forward<< not allowed" \
  4. "in an interface section."
  5. return
  6. fi
  7. [ "$interface" != all ] && return
  8. addcode up 9 5 "echo 1 > /proc/sys/net/ipv4/ip_forward"
  9. addcode down 9 5 "echo 0 > /proc/sys/net/ipv4/ip_forward"
  10. }