You don't know how enable ipfw, or what your problem?
For enable ipfw you should in /etc/rc.conf add:
- firewall_enable="YES" # enable ipfw
- firewall_script="/etc/rc.firewall" # path firewall rules
For block IP country, you should in google find ip address(CIDR) of country.
ex. rule for block all from table:
- ipfw add deny all from "table(1)" to any
and in table 1 need add all CIDR country, ex:
- ipfw table 1 add 126.123.112.0/18