When I switch from WIFI to 3G (by disabling the WIFI radio or going out of range), the firewall is no longer working unless I open avast, disable firewall, then re-enable. Going the other way, from 3G to WIFI does not have this problem.
UPDATE: Working normally after I disabled the “Set mobile data limit” feature. It seems Avast is not compatible with the “Set mobile data limit” included in ICS firmwares.