Hi!
I am working on a hobby project and I need some help. I usemac osx Mac OS X whose firewalling is based on openbsd OpenBSD's packet filtering. I have some questions and I hope you can help me getting them cleared.
I am not having CS background, so you have to be patient with me. I understood what he was trying to say but I am not sure how to implement it. The OpenBSD's documentation on PF tables is not so good (at least I didn't understand it very well). Could someone explain me how to use tables and make them persist and then ensure that all Internet traffic can be disabled by the said tables?
I am working on a hobby project and I need some help. I use
- I want to disable Internet for some time on my system. My progress so far is: edit the pf.conf file using the command line, add
at the end of the pf.conf file and save the file and then reload the pf.conf rules using theCode:
block allpfctl -f /etc/pf.confcommand. - I want to create a tiny application that will have this slider which can be adjusted and it indicates how long the Internet can be disabled (say for fifteen minutes, eight hours etc.) and someone somewhere told me this:
Ok. You probably want to look into tables. You can create a table and make it persist even if there are zero entries in it. Then you can modify the table with pfctl commands on the fly. No need to edit the file or reload rules every time.
I am not having CS background, so you have to be patient with me. I understood what he was trying to say but I am not sure how to implement it. The OpenBSD's documentation on PF tables is not so good (at least I didn't understand it very well). Could someone explain me how to use tables and make them persist and then ensure that all Internet traffic can be disabled by the said tables?