{"id":154,"date":"2015-08-29T17:59:14","date_gmt":"2015-08-29T17:59:14","guid":{"rendered":"http:\/\/onebyte.org\/blog\/?p=154"},"modified":"2022-05-01T07:57:26","modified_gmt":"2022-05-01T12:57:26","slug":"useful-pfsense-commands","status":"publish","type":"post","link":"https:\/\/www.onebyte.org\/blog\/2015\/08\/29\/useful-pfsense-commands\/","title":{"rendered":"Useful pfSense commands"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1023 aligncenter\" src=\"https:\/\/www.onebyte.org\/blog\/wp-content\/uploads\/2015\/08\/pf_moo.png\" alt=\"\" width=\"800\" height=\"235\" srcset=\"https:\/\/www.onebyte.org\/blog\/wp-content\/uploads\/2015\/08\/pf_moo.png 800w, https:\/\/www.onebyte.org\/blog\/wp-content\/uploads\/2015\/08\/pf_moo-300x88.png 300w, https:\/\/www.onebyte.org\/blog\/wp-content\/uploads\/2015\/08\/pf_moo-768x226.png 768w, https:\/\/www.onebyte.org\/blog\/wp-content\/uploads\/2015\/08\/pf_moo-272x80.png 272w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/p>\n<p>Here are some commands that I&#8217;ve compiled over my time working with pfSense. My pfSense cheat sheet!<\/p>\n<table style=\"height: 4145px; width: 108.333%;\" width=\"777\">\n<tbody>\n<tr style=\"height: 27px;\">\n<td style=\"width: 50.8791%; height: 27px;\"><strong>Description<\/strong><\/td>\n<td style=\"width: 48.2417%; height: 27px;\"><strong>Command<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 74px;\">\n<td style=\"width: 50.8791%; height: 74px;\">Reload the Firewall with all the configuration. This also restarts the webgui and sshd \u2013 but keeps the current ssh sessions active just as a regular sshd restart.<\/td>\n<td style=\"width: 48.2417%; height: 74px;\"><strong>\/etc\/rc.reload_all<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 120px;\">\n<td style=\"width: 50.8791%; height: 120px;\">Manually edit the configuration in \/conf\/config.xml. Once file has been saved and editor exited, the \/tmp\/config.cache is removed so the next config reload event will load config.xml, not the cached version. You could run the next command to trigger an instant reload.<\/td>\n<td style=\"width: 48.2417%; height: 120px;\"><strong>viconfig \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 50.8791%; height: 27px;\">\u00a0<\/td>\n<td style=\"width: 48.2417%; height: 27px;\"><strong>\u00a0<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 50.8791%; height: 27px;\">Show rule\/filter information<\/td>\n<td style=\"width: 48.2417%; height: 27px;\"><strong>pfctl -s rules<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 50.8791%; height: 27px;\">Show rule\/filter info for what FILTER rules hit<\/td>\n<td style=\"width: 48.2417%; height: 27px;\"><strong>pfctl -v -s rules<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 50.8791%; height: 27px;\">Show rule\/filter info, includes rule counters, ID numbers, etc.<\/td>\n<td style=\"width: 48.2417%; height: 27px;\"><strong>pfctl -vvsr<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 50.8791%; height: 27px;\">Shows the current state table<\/td>\n<td style=\"width: 48.2417%; height: 27px;\"><strong>pfctl -ss<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 50.8791%; height: 27px;\">Shows current filter rules<\/td>\n<td style=\"width: 48.2417%; height: 27px;\"><strong>pfctl -sr<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 50.8791%; height: 27px;\">Show as much as possible.<\/td>\n<td style=\"width: 48.2417%; height: 27px;\"><strong>pfctl -sa<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 50.8791%; height: 27px;\">Shows current NAT rules<\/td>\n<td style=\"width: 48.2417%; height: 27px;\"><strong>pfctl -sn<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 50.8791%; height: 27px;\">Show NAT information for which rules hit<\/td>\n<td style=\"width: 48.2417%; height: 27px;\"><strong>pfctl -v -s nat<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 50.8791%; height: 27px;\">Show NAT information for interface GE1<\/td>\n<td style=\"width: 48.2417%; height: 27px;\"><strong>pfctl -s nat -i ge1<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 50.8791%; height: 27px;\">Show QUEUE information<\/td>\n<td style=\"width: 48.2417%; height: 27px;\"><strong>pfctl -s queue<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 50.8791%; height: 27px;\">Show LABEL information<\/td>\n<td style=\"width: 48.2417%; height: 27px;\"><strong>pfctl -s label<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 50.8791%; height: 27px;\">Show contents of the STATE table<\/td>\n<td style=\"width: 48.2417%; height: 27px;\"><strong>pfctl -s state<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 50.8791%; height: 27px;\">Show statistics for state tables and packet normalization<\/td>\n<td style=\"width: 48.2417%; height: 27px;\"><strong>pfctl -s info<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 50.8791%; height: 27px;\">Show everything<\/td>\n<td style=\"width: 48.2417%; height: 27px;\"><strong>pfctl -s all<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 50.8791%; height: 27px;\">Enable the packet filter \u2013 enables <strong>all firewall<\/strong> functions<\/td>\n<td style=\"width: 48.2417%; height: 27px;\"><strong>pfctl -e<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 50.8791%; height: 27px;\">Disable the packet filter \u2013 disables <strong>all firewall<\/strong> functions<\/td>\n<td style=\"width: 48.2417%; height: 27px;\"><strong>pfctl -d<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 50.8791%; height: 27px;\">Run qiuet<\/td>\n<td style=\"width: 48.2417%; height: 27px;\"><strong>pfctl -q<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 50.8791%; height: 27px;\">\u00a0<\/td>\n<td style=\"width: 48.2417%; height: 27px;\">\u00a0<\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 50.8791%; height: 27px;\">flush ALL<\/td>\n<td style=\"width: 48.2417%; height: 27px;\"><strong>pfctl -F all<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 50.8791%; height: 27px;\">flush only the RULES<\/td>\n<td style=\"width: 48.2417%; height: 27px;\"><strong>pfctl -F rules<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 50.8791%; height: 27px;\">flush only queues<\/td>\n<td style=\"width: 48.2417%; height: 27px;\"><strong>pfctl -f queue<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 50.8791%; height: 27px;\">flush only NAT<\/td>\n<td style=\"width: 48.2417%; height: 27px;\"><strong>pfctl -F nat<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 50.8791%; height: 27px;\">pfctl -F info<\/td>\n<td style=\"width: 48.2417%; height: 27px;\"><strong>flush all stats that are not part of any rule<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 50.8791%; height: 27px;\">pfctl -z clear<\/td>\n<td style=\"width: 48.2417%; height: 27px;\"><strong>all counters<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 50px;\">\n<td style=\"width: 50.8791%; height: 50px;\"><strong>Playback Scripts<\/strong><\/td>\n<td style=\"width: 48.2417%; height: 50px;\">\u00a0<\/td>\n<\/tr>\n<tr style=\"height: 50px;\">\n<td style=\"width: 50.8791%; height: 50px;\">Changes password for the defined user. Prompts to reset the account properties if it is disabled or expired<\/td>\n<td style=\"width: 48.2417%; height: 50px;\"><strong>pfSsh.php playback changepassword<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 155px;\">\n<td style=\"width: 50.8791%; height: 155px;\">Enable\/Disable CARP high availability functions. Will deactivate the CARP virtual IP addresses. Does not persist across reboots.<\/td>\n<td style=\"width: 48.2417%; height: 155px;\">\n<p><strong>pfSsh.php playback disablecard<\/strong><\/p>\n<p><strong><br \/>pfSsh.php playback enablecarp<br \/><\/strong><\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 122px;\">\n<td style=\"width: 50.8791%; height: 122px;\">Enable\/Disable CARP maintenance mode. This leaves CARP active but demotes the unit so that another can assume control. Maintenance mode will persist across reboots.<\/td>\n<td style=\"width: 48.2417%; height: 122px;\">\n<p><strong>pfSsh.php playback disablecarpmaint<br \/><\/strong><\/p>\n<p><strong>pfSsh.php playback enablecarpmaint<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 72px;\">\n<td style=\"width: 50.8791%; height: 72px;\">Removes all DHCP configuration from the firewall causing DHCP to be disabled. It completely removes all of its settings.<\/td>\n<td style=\"width: 48.2417%; height: 72px;\">\n<p><strong>pfSsh.php playback disabledhcp<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 74px;\">\n<td style=\"width: 50.8791%; height: 74px;\">Disables the <em>HTTP_REFERER<\/em> check in Browser <a href=\"https:\/\/docs.netgate.com\/pfsense\/en\/latest\/config\/advanced-admin.html#config-httpreferercheck\">HTTP_REFERER enforcement<\/a>. This can aid in gaining access to the GUI if the browser session is triggering this protection.<\/td>\n<td style=\"width: 48.2417%; height: 74px;\">\n<p><strong>pfSsh.php playback disablereferercheck<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 219px;\">\n<td style=\"width: 50.8791%; height: 219px;\">\n<p>Adds an allow all rule for IPv4 and IPv6 to the WAN interface<\/p>\n<p><span style=\"background-color: #ffeebf;\"><em>Be extremely careful with this option, it is meant to be a <strong>temporary<\/strong> measure to gain access to services on the WAN interface of the firewall in situations where the LAN is not usable. Once proper access rules are put in place, remove the rules added by this script.<\/em><\/span><\/p>\n<\/td>\n<td style=\"width: 48.2417%; height: 219px;\">\n<p><strong>pfSsh.php playback enableallowallwan<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 72px;\">\n<td style=\"width: 50.8791%; height: 72px;\">\n<p>Enables the SSH daemon &#8211; same as the menu option or in the GUI<\/p>\n<\/td>\n<td style=\"width: 48.2417%; height: 72px;\">\n<p><strong>pfSsh.php playback enablesshd<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 104px;\">\n<td style=\"width: 50.8791%; height: 104px;\">\n<p>This script looks for a <em>config.xml<\/em> file on the external device, such as a USB drive. Then move it in place for use by the firewall.<\/p>\n<\/td>\n<td style=\"width: 48.2417%; height: 104px;\">\n<p><strong>pfSsh.php playback externalconfiglocator<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 137px;\">\n<td style=\"width: 50.8791%; height: 137px;\">\n<p>Prints the current gateway status and statistics. This also accepts an optional parameter <em>brief<\/em>, which prints only the gateway name and status, omitting the addresses and statistical data.<\/p>\n<\/td>\n<td style=\"width: 48.2417%; height: 137px;\">\n<p><strong>pfSsh.php playback gatewaystatus<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 201px;\">\n<td style=\"width: 50.8791%; height: 201px;\">\n<p>Creates a new self-signed certificate for the firewall and activates for use in the GUI. This can be useful in cases where the previous certificate is invalid or unusable. It also fills in the certificate details using the firewall hostname and other custom information for better identifying your host.<\/p>\n<\/td>\n<td style=\"width: 48.2417%; height: 201px;\">\n<p><strong>pfSsh.php playback generateguicert<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 284px;\">\n<td style=\"width: 50.8791%; height: 284px;\">\n<p>A complex script that synchronizes the PHP and other script sources with the files from the pfSense GitHub repository. This is most useful on development snapshots to pick up changes from more recent commits.<\/p>\n<p><strong><span style=\"background-color: #ffeebf;\">This script can be dangerous to use in other circumstances. Only use this under the direction of a knowledgeable developer or support representative.<\/span><\/strong><\/p>\n<\/td>\n<td style=\"width: 48.2417%; height: 284px;\">\n<p><strong>pfSsh.php playback gitsync<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 173px;\">\n<td style=\"width: 50.8791%; height: 173px;\">\n<p>\u00a0<\/p>\n<\/td>\n<td style=\"width: 48.2417%; height: 173px;\">\n<p><strong>pfSsh.php playback install pkg<\/strong><\/p>\n<p><strong>pfSsh.php playback listpkg<\/strong><\/p>\n<p><strong>pfSsh.php playback uninstallpkg<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 104px;\">\n<td style=\"width: 50.8791%; height: 104px;\">\n<p>View additional rules in anchors from packages or features, such as UPnP.<\/p>\n<\/td>\n<td style=\"width: 48.2417%; height: 104px;\">\n<p><strong>pfSsh.php playback pfanchordrill<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 72px;\">\n<td style=\"width: 50.8791%; height: 72px;\">\n<p>Prints the contents of all <em>pf <\/em>tables, which contain addresses used in firewall aliases, as well as built-in system tables for features such as bogon network blocking, snort, and GUI\/SSH lockout. This is also useful for checking if a specific IP address is found in any table, rather than searching individually.<\/p>\n<\/td>\n<td style=\"width: 48.2417%; height: 72px;\">\n<p><strong>pfSsh.php playback pftabledrill<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 72px;\">\n<td style=\"width: 50.8791%; height: 72px;\">\n<p>Removes all traces of package configuration data from the running <em>config.xml<\/em>. This can be useful if a package has corrupted settings or has otherwise left the packages in an inconsistent state.<\/p>\n<\/td>\n<td style=\"width: 48.2417%; height: 72px;\">\n<p><strong>pfSsh.php playback removepkgconfig<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 72px;\">\n<td style=\"width: 50.8791%; height: 72px;\">\n<p>Removes ALTQ traffic shaper settings, which can be useful if the shaper configuration is preventing rules from loading or is otherwise incorrect and preventing proper operations of the firewall.<\/p>\n<\/td>\n<td style=\"width: 48.2417%; height: 72px;\">\n<p><strong>pfSsh.php playback removeshaper<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 72px;\">\n<td style=\"width: 50.8791%; height: 72px;\">\n<p>Resets the GUI settings for widgets, dashboard columns, the theme, and other GUI-related settings. It can return the GUI, particularly the dashboard, to a stable state if it is not functioning properly.<\/p>\n<\/td>\n<td style=\"width: 48.2417%; height: 72px;\">\n<p><strong>pfSsh.php playback resetwebgui<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 72px;\">\n<td style=\"width: 50.8791%; height: 72px;\">\n<p>Disables and re-enables each WAN-type interface, which reapplies the interface configuration<\/p>\n<\/td>\n<td style=\"width: 48.2417%; height: 72px;\">\n<p><strong>pfSsh.php playback restartallwan<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 72px;\">\n<td style=\"width: 50.8791%; height: 72px;\">\n<p>Stops and restarts the DHCP daemon<\/p>\n<\/td>\n<td style=\"width: 48.2417%; height: 72px;\">\n<p><strong>pfSsh.php playback restartdhcpd<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 72px;\">\n<td style=\"width: 50.8791%; height: 72px;\">\n<p>Rewrites and reloads the IPsec configuration for strongSwan<\/p>\n<\/td>\n<td style=\"width: 48.2417%; height: 72px;\">\n<p><strong>pfSsh.php playback restartipsec<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 72px;\">\n<td style=\"width: 50.8791%; height: 72px;\">\n<p>Controls the services running on the firewall, similar to interacting with services at <strong>Status<\/strong> &gt; <strong>Services<\/strong><\/p>\n<p>The\u00a0<strong>action<\/strong>\u00a0can be\u00a0<em>stop<\/em>,\u00a0<em>start<\/em>, or\u00a0<em>restart<\/em>.<\/p>\n<p>The\u00a0<strong>service name<\/strong>\u00a0is the name of the services as found under\u00a0<strong>Status &gt; Services<\/strong>. If the name includes a space, enclose the name in quotes.<\/p>\n<p>The\u00a0<strong>service-specific options<\/strong>\u00a0vary depending on the service, they are used to uniquely identify services with multiple instances, such as OpenVPN or Captive Portal entries.<\/p>\n<\/td>\n<td style=\"width: 48.2417%; height: 72px;\">\n<p><strong>pfSsh.php playback svc<\/strong><\/p>\n<p><strong>playback svc &lt;action&gt; &lt;service name&gt; [service-specific options]<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 72px;\">\n<td style=\"width: 50.8791%; height: 72px;\">\n<p>\u00a0<\/p>\n<\/td>\n<td style=\"width: 48.2417%; height: 72px;\">\n<p><strong>\u00a0<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 320px;\">\n<td style=\"width: 50.8791%; height: 320px;\">\n<p>The shell version of Easy Rule,\u00a0<em>easyrule<\/em>, can add a firewall rule from a shell prompt. When the\u00a0<em>easyrule\u00a0<\/em>command is run without parameters, it prints a usage message to explain its syntax.<\/p>\n<p>The way\u00a0<em>easyrule\u00a0<\/em>adds a block rule using an alias, or a precise pass rule specifying the protocol, source, and destination, work similar to the GUI version.<\/p>\n<p>\u00a0<\/p>\n<\/td>\n<td style=\"width: 48.2417%; height: 320px;\">\n<p><strong>easyrule pass\/block &lt;interface&gt; &lt;protocol&gt; &lt;source IP&gt; &lt;destination ip&gt; [destination port]<\/strong><\/p>\n<p>easyrule pass wan tcp 0.0.0.0\/0 192.168.0.1 80<\/p>\n<p>easyrule pass wan icmp 1.1.1.1 192.168.0.1<\/p>\n<p>easyrule block wan 1.1.1.1<\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 50.8791%; height: 27px;\" width=\"288\">show table addvhosts<\/td>\n<td style=\"width: 48.2417%; height: 27px;\" width=\"64\"><strong>pfctl -t addvhosts -T show<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 50.8791%; height: 27px;\">view global information about all tables<\/td>\n<td style=\"width: 48.2417%; height: 27px;\"><strong>pfctl -vvsTables<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 50.8791%; height: 27px;\">add entry to table addvhosts<\/td>\n<td style=\"width: 48.2417%; height: 27px;\"><strong>pfctl -t addvhosts -T add 192.168.1.50<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 50.8791%; height: 27px;\">add a network to table addvhosts<\/td>\n<td style=\"width: 48.2417%; height: 27px;\"><strong>pfctl -t addvhosts -T add 192.168.1.0\/16<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 50.8791%; height: 27px;\">delete nework from table addvhosts<\/td>\n<td style=\"width: 48.2417%; height: 27px;\"><strong>pfctl -t addvhosts -T delete 192.168.1.0\/16<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 50.8791%; height: 27px;\">remove all entries from table addvhosts<\/td>\n<td style=\"width: 48.2417%; height: 27px;\"><strong>pfctl -t addvhosts -T flush<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 50.8791%; height: 27px;\">delete table addvhosts entirely<\/td>\n<td style=\"width: 48.2417%; height: 27px;\"><strong>pfctl -t addvhosts -T kill<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 50px;\">\n<td style=\"width: 50.8791%; height: 50px;\">reload table addvhosts on the fly<\/td>\n<td style=\"width: 48.2417%; height: 50px;\"><strong>pfctl -t addvhosts -T replace -f \/etc\/addvhosts<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 50.8791%; height: 27px;\">find ip address 192.168.1.40 in table addvhosts<\/td>\n<td style=\"width: 48.2417%; height: 27px;\"><strong>pfctl -t addvhosts -T test 192.168.1.40<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 50.8791%; height: 27px;\">load a new table definition<\/td>\n<td style=\"width: 48.2417%; height: 27px;\"><strong>pfctl -T load -f \/etc\/pf.conf<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 50.8791%; height: 27px;\">stats for each ip address in table addvhosts<\/td>\n<td style=\"width: 48.2417%; height: 27px;\"><strong>pfctl -t addvhosts -T show -v output<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 72px;\">\n<td style=\"width: 50.8791%; height: 72px;\">\n<p>reset all counters for table addvhosts<\/p>\n<\/td>\n<td style=\"width: 48.2417%; height: 72px;\"><strong>pfctl -t addvhosts -T zero<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 72px;\">\n<td style=\"width: 50.8791%; height: 72px;\">\n<p>Manual restart of openVPN process<\/p>\n<\/td>\n<td style=\"width: 48.2417%; height: 72px;\"><strong>echo &#8220;&lt;?php include(&#8216;openvpn.inc&#8217;); openvpn_resync_all();?&gt;&#8221; | php -q<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u00a0<\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>Compiled list of pfsense commands that I use as my cheat sheet.<\/p>\n","protected":false},"author":1,"featured_media":1023,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","footnotes":""},"categories":[3,18,21],"tags":[12,11,10],"class_list":["post-154","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-networking","category-software","tag-commands","tag-firewall","tag-pfsense"],"uagb_featured_image_src":{"full":["https:\/\/www.onebyte.org\/blog\/wp-content\/uploads\/2015\/08\/pf_moo.png",800,235,false],"thumbnail":["https:\/\/www.onebyte.org\/blog\/wp-content\/uploads\/2015\/08\/pf_moo-150x150.png",150,150,true],"medium":["https:\/\/www.onebyte.org\/blog\/wp-content\/uploads\/2015\/08\/pf_moo-300x88.png",300,88,true],"medium_large":["https:\/\/www.onebyte.org\/blog\/wp-content\/uploads\/2015\/08\/pf_moo-768x226.png",768,226,true],"large":["https:\/\/www.onebyte.org\/blog\/wp-content\/uploads\/2015\/08\/pf_moo.png",800,235,false],"1536x1536":["https:\/\/www.onebyte.org\/blog\/wp-content\/uploads\/2015\/08\/pf_moo.png",800,235,false],"2048x2048":["https:\/\/www.onebyte.org\/blog\/wp-content\/uploads\/2015\/08\/pf_moo.png",800,235,false],"post-thumbnail":["https:\/\/www.onebyte.org\/blog\/wp-content\/uploads\/2015\/08\/pf_moo.png",800,235,false],"modality-logo":["https:\/\/www.onebyte.org\/blog\/wp-content\/uploads\/2015\/08\/pf_moo-272x80.png",272,80,true]},"uagb_author_info":{"display_name":"Mr-Moo","author_link":"https:\/\/www.onebyte.org\/blog\/author\/ahess\/"},"uagb_comment_info":1,"uagb_excerpt":"Compiled list of pfsense commands that I use as my cheat sheet.","_links":{"self":[{"href":"https:\/\/www.onebyte.org\/blog\/wp-json\/wp\/v2\/posts\/154","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.onebyte.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.onebyte.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.onebyte.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.onebyte.org\/blog\/wp-json\/wp\/v2\/comments?post=154"}],"version-history":[{"count":2,"href":"https:\/\/www.onebyte.org\/blog\/wp-json\/wp\/v2\/posts\/154\/revisions"}],"predecessor-version":[{"id":1024,"href":"https:\/\/www.onebyte.org\/blog\/wp-json\/wp\/v2\/posts\/154\/revisions\/1024"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.onebyte.org\/blog\/wp-json\/wp\/v2\/media\/1023"}],"wp:attachment":[{"href":"https:\/\/www.onebyte.org\/blog\/wp-json\/wp\/v2\/media?parent=154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.onebyte.org\/blog\/wp-json\/wp\/v2\/categories?post=154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.onebyte.org\/blog\/wp-json\/wp\/v2\/tags?post=154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}