Hi Stefan,

in /etc/hotplug.d/iface, add a new script with these contents:

#!/bin/sh

if [ "$ACTION" = ifup ] && [ "$INTERFACE" = wan ]; then
  # This is an OpenWrt specific kernel hack and will not work on
  # a normal distro. The "echo f" is equivalent with the
  # "conntrack -F" command.
  echo f > /proc/net/nf_conntrack
fi


The script above will flush the conntrack table whenever a new IP was
obtained, thus effectively invalidating established/related connections.

If your specific OpenWrt version does not support the flush shortcut
(noticeable when "wc -l /proc/net/nf_conntrack" is not changed
immediately after the echo) you can instqall conntrack-tools instead and
substitude the flush command with a call to "conntrack -F".

HTH,
Jow

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
openwrt-users mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-users

Reply via email to