Openunix.eu


IP Filter comands in NetBSD

  • enable ip-filter ,nat and logging in /etc/rc.conf
    ipfilter=YES
    ipnat=YES
    ipfstat=YES
    ipmon=YES

  • starting, restarting and stopping the service
    # /etc/ipfilter start
    # /etc/ipfilter restart
    # /etc/ipfilter stop

    If ipfilter is run with ipnat, ipnat MUST be restarted after ipfilter is restarted.

  • managing ipnat
    # /etc/ipnat start
    # /etc/ipnat restart
    # /etc/ipnat stop

  • To see which natting rules are applied use:
    # ipnat -l

  • To see which IP filter rules are applied for incoming traffic use:
    # ipfstat -i

  • To see which IP filter rules are applied for outgoing traffic use:
    # ipfstat -o


  •  

    Powered by NetBSD. Running on a toaster.