<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Remote Packet Capture]]></title><description><![CDATA[<p dir="auto">I know that remote packet capturing (realtime capture of a remote tcpdump with Wireshark) can be done with Linux and I've done that before.  Is it also supported with FreeBSD?  I'm guessing it is.  If so does the pfSense install have everything needed?  Guessing it does but would just like to verify before spending time attempting to make something work that is not going to.</p>
<p dir="auto">As a bonus if someone has the tcpdump command line handy for setting up the remote capture that would be great not having to start from scratch.</p>
]]></description><link>https://forum.netgate.com/topic/80778/remote-packet-capture</link><generator>RSS for Node</generator><lastBuildDate>Wed, 10 Jun 2026 05:32:41 GMT</lastBuildDate><atom:link href="https://forum.netgate.com/topic/80778.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 05 Mar 2015 23:03:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Remote Packet Capture on Tue, 26 Sep 2017 05:08:37 GMT]]></title><description><![CDATA[<p dir="auto">I have toyed a bit with this , and here is a working solution wo. to much "no..no"</p>
<pre><code>
********* Works wo sudo hack on linux **************

Only first time (ever) - to make ssh work wo. asking for passwd
ssh-keygen
ssh-copy-id user@pfsense-fw

If sudo is installed on pfsense
----------------------------------
remote:~$ mkfifo /tmp/pcap
remote:~$ sudo tcpdump -iigb1 -U -s0 -w - 'not port 22' &gt; /tmp/pcap

If sudo is not installed on pfsense
------------------------------------
ssh to pfsense as root/admin , enter 8 for shell

remote:~# mkfifo /tmp/pcap
remote:~# tcpdump -iigb1 -U -s0 -w - 'not port 22' &gt; /tmp/pcap

and send the data by a separate connection:

local:~$ mkfifo /tmp/pcap
local:~$ ssh user@pfsense-fw "cat /tmp/pcap" &gt; /tmp/pcap

and finally start Wireshark

local:~$ sudo wireshark -k -i /tmp/pcap

********************* end ***************

</code></pre>
<p dir="auto">I do have this one liner working<br />
As local root (due to wireshark needs root)</p>
<pre><code>
local:# ssh user@pfsense-fw sudo tcpdump -iigb1 -U -s0 -w - 'not port 22' | wireshark -k -i -

</code></pre>
<p dir="auto">But it requires sudo to be installed on pfsense</p>
<pre><code>
https://www.cyberciti.biz/faq/how-to-add-delete-grant-sudo-privileges-to-users-on-freebsd-unix-server/

install
pkg install security/sudo

</code></pre>
<p dir="auto">And some "nasty" visudo things, that would get a "security officer/revision" to get "Red Ears" ….</p>
<p dir="auto">I could prob lock it down to just work with tcpdump , but for now it's allowing my local user to sudo anything wo even asking for a pwd. Provided he's a member of the admin group.</p>
<p dir="auto">Have fun "Sharking"</p>
<p dir="auto">Ps:<br />
Most of this nasty stuff would prob not be needed of we could get a way to ssh into pfsense as root , wo. hitting the "menu".<br />
Or if we could ssh into pfsense w. a user that was allowed to run tcpdump on an interface.</p>
<p dir="auto">/Bingo</p>
]]></description><link>https://forum.netgate.com/post/723719</link><guid isPermaLink="true">https://forum.netgate.com/post/723719</guid><dc:creator><![CDATA[bingo600]]></dc:creator><pubDate>Tue, 26 Sep 2017 05:08:37 GMT</pubDate></item><item><title><![CDATA[Reply to Remote Packet Capture on Sun, 27 Aug 2017 15:00:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/flagcc">@<bdi>flagcc</bdi></a>:</p>
<blockquote>
<p dir="auto">Modified to my needs of course, and it starts to work, it opens wireshark and asked me if the connection was secure and then nothing comes through into wireshark, it just sits there idle.</p>
<p dir="auto">I have tried promiscuous and non promiscuous modes.</p>
<p dir="auto">Any suggestions?</p>
</blockquote>
<p dir="auto"><strong>Reason:</strong><br />
Connecting using user "<em>root</em>" or "<em>admin</em>" will end up in a CLI-Menu but no shell.<br />
Thus and tcpdump cannot start and you will see nothing.</p>
<p dir="auto"><strong>Solution:</strong><br />
Start like this:</p>
<pre><code>(echo 8) | plink root@pfsense tcpdump -n -s 0 -nn -U -w - -i em0  icmp | wireshark -i - -k
</code></pre>
<p dir="auto"><strong>"( echo 8 )"</strong> will type "8" for you in order to exit from the menu to the shell (at time of writing).</p>
<p dir="auto">After that I assume wireshark is working properly.</p>
]]></description><link>https://forum.netgate.com/post/718424</link><guid isPermaLink="true">https://forum.netgate.com/post/718424</guid><dc:creator><![CDATA[Quirinius]]></dc:creator><pubDate>Sun, 27 Aug 2017 15:00:47 GMT</pubDate></item><item><title><![CDATA[Reply to Remote Packet Capture on Fri, 13 Jan 2017 22:08:12 GMT]]></title><description><![CDATA[<p dir="auto">Experimenting with the new Wireshark SSH remote capture interface.  It's there but not really usable yet.  Some show stopper bugs that appear to still being workout and some fixes that have not been included in the latest stable release (2.2.3).</p>
<ol>
<li>The GUI won't accept an SSH key path.</li>
<li>Sends options for remote binary dumpcap when specifying tcpdump.  The -f option has different meaning for tcpdump.</li>
<li>No means of specifying options for the remote binary command.</li>
<li>Captures a few packets and then prematurely stops capturing.</li>
<li>kex algorithm mismatch between Wireshark SSH client and pfSense SSHd.</li>
</ol>
<p dir="auto">The default remote binary is dumpcap.  From what I gleaned from bug reports it sounds like dumpcap is preferred over tcpdump due to some security issues with tcpdump being run with full privileges.</p>
<p dir="auto">Unfortunately it does not appear dumpcap has been compiled for FreeBSD.  At least not that I could find.  Would be nice if someone could compile and get it included in the FreeBSD ports/packages or wherever appropriate and included in pfSense build.</p>
<p dir="auto">In the meantime for experimenting I've been using a dumpcap script to translate to tcpdump.</p>
<pre><code>
#/bin/sh
echo $0 &gt;/var/dumpcap.txt
echo $1 &gt;&gt;/var/dumpcap.txt
echo $2 &gt;&gt;/var/dumpcap.txt
echo $3 &gt;&gt;/var/dumpcap.txt
echo $4 &gt;&gt;/var/dumpcap.txt
echo $5 &gt;&gt;/var/dumpcap.txt
echo $6 &gt;&gt;/var/dumpcap.txt
echo $7 &gt;&gt;/var/dumpcap.txt

#/var/dumpcap
#-i em1 -w - -f not port 22

#/usr/sbin/tcpdump -p -n -nn -s 0 -U -w - -i em0 not port 22
#/usr/sbin/tcpdump -p -n -nn -s 0 -U -w - $3 $4 $6
 /usr/sbin/tcpdump -p -n -nn -s 0 -U $1 $2 $3 $4 $6

</code></pre>
<p dir="auto">Once it all gets ironed out this should be much nicer than using command line to third party SSH app and pipe to Wireshark.  Basically doing the same thing, just providing a GUI frontend within Wireshark.</p>
]]></description><link>https://forum.netgate.com/post/672538</link><guid isPermaLink="true">https://forum.netgate.com/post/672538</guid><dc:creator><![CDATA[NOYB]]></dc:creator><pubDate>Fri, 13 Jan 2017 22:08:12 GMT</pubDate></item><item><title><![CDATA[Reply to Remote Packet Capture on Thu, 12 Jan 2017 23:04:07 GMT]]></title><description><![CDATA[<p dir="auto">Just installed Wireshark 2.2.3 and it has the SSH remote capture interface.  But can't establish the SSH connection due no match for method kex algos.</p>
<p dir="auto">![SSH Remote Capture - Settings.jpg](/public/<em>imported_attachments</em>/1/SSH Remote Capture - Settings.jpg)<br />
![SSH Remote Capture - Settings.jpg_thumb](/public/<em>imported_attachments</em>/1/SSH Remote Capture - Settings.jpg_thumb)<br />
![SSH Remote Capture -  Error.jpg](/public/<em>imported_attachments</em>/1/SSH Remote Capture -  Error.jpg)<br />
![SSH Remote Capture -  Error.jpg_thumb](/public/<em>imported_attachments</em>/1/SSH Remote Capture -  Error.jpg_thumb)</p>
]]></description><link>https://forum.netgate.com/post/672321</link><guid isPermaLink="true">https://forum.netgate.com/post/672321</guid><dc:creator><![CDATA[NOYB]]></dc:creator><pubDate>Thu, 12 Jan 2017 23:04:07 GMT</pubDate></item><item><title><![CDATA[Reply to Remote Packet Capture on Thu, 12 Jan 2017 12:32:26 GMT]]></title><description><![CDATA[<p dir="auto">I've been told it is being worked on to handle this within Wireshark.<br />
That would be awesome.  Hope it's true and arrives soon.  Stay tuned.</p>
<p dir="auto">SSH Remote Capture TCPdump<br />
https://ask.wireshark.org/questions/58696/ssh-remote-capture-tcpdump</p>
]]></description><link>https://forum.netgate.com/post/672186</link><guid isPermaLink="true">https://forum.netgate.com/post/672186</guid><dc:creator><![CDATA[NOYB]]></dc:creator><pubDate>Thu, 12 Jan 2017 12:32:26 GMT</pubDate></item><item><title><![CDATA[Reply to Remote Packet Capture on Tue, 17 Mar 2015 05:25:12 GMT]]></title><description><![CDATA[<p dir="auto">That would indicate that the SSH tunnel is not getting established.</p>
<p dir="auto">Verify the authentication method (key and/or password) and the user credentials being used.</p>
<p dir="auto">Also verify the pfSense machine's address being used is correct.</p>
<p dir="auto">Also verify the plink.exe path is correct and that plink is working.</p>
]]></description><link>https://forum.netgate.com/post/528204</link><guid isPermaLink="true">https://forum.netgate.com/post/528204</guid><dc:creator><![CDATA[NOYB]]></dc:creator><pubDate>Tue, 17 Mar 2015 05:25:12 GMT</pubDate></item><item><title><![CDATA[Reply to Remote Packet Capture on Tue, 17 Mar 2015 02:16:15 GMT]]></title><description><![CDATA[<p dir="auto">I am trying to use your command line script:</p>
<p dir="auto">"c:\wireshark\plink.exe" -ssh -pw pword root@pfSense.localhost tcpdump -n -nn -s 0 -U -w - -i em1 vlan 99 and icmp | "C:\Program Files\Wireshark\wireshark.exe" -i - -k -p</p>
<p dir="auto">Modified to my needs of course, and it starts to work, it opens wireshark and asked me if the connection was secure and then nothing comes through into wireshark, it just sits there idle.</p>
<p dir="auto">I have tried promiscuous and non promiscuous modes.</p>
<p dir="auto">Any suggestions?</p>
]]></description><link>https://forum.netgate.com/post/528174</link><guid isPermaLink="true">https://forum.netgate.com/post/528174</guid><dc:creator><![CDATA[flagcc]]></dc:creator><pubDate>Tue, 17 Mar 2015 02:16:15 GMT</pubDate></item><item><title><![CDATA[Reply to Remote Packet Capture on Fri, 06 Mar 2015 23:02:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/fatsailor">@<bdi>fatsailor</bdi></a>:</p>
<blockquote>
<p dir="auto">I'm not sure I'd feed it into wireshark directly. Lots of corner cases can appear that way.</p>
</blockquote>
<p dir="auto">Such as?  Examples?</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/fatsailor">@<bdi>fatsailor</bdi></a>:</p>
<blockquote>
<p dir="auto">Why not save pcaps, and then load those directly into wireshark?</p>
<p dir="auto">Bro with Timemachine (not AAPL's) and I think Vortex will both capture pcaps for replay.</p>
<p dir="auto">Even easier (but not secure), mount a remote file system and tcpdump to it.</p>
</blockquote>
<p dir="auto">Not realtime/live packet captures.  See what's happening as it happens.</p>
<p dir="auto">As for easy.  This is pretty easy.  Just install puTTY (plink), build a few command lines in a text editor for common capture filters, and paste as needed in to a command shell.  Poof Wireshark is live capturing the pfSense interface of your choice.</p>
]]></description><link>https://forum.netgate.com/post/525657</link><guid isPermaLink="true">https://forum.netgate.com/post/525657</guid><dc:creator><![CDATA[NOYB]]></dc:creator><pubDate>Fri, 06 Mar 2015 23:02:14 GMT</pubDate></item><item><title><![CDATA[Reply to Remote Packet Capture on Fri, 06 Mar 2015 18:25:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/noyb">@<bdi>NOYB</bdi></a>:</p>
<blockquote>
<p dir="auto">I know that remote packet capturing (realtime capture of a remote tcpdump with Wireshark) can be done with Linux and I've done that before.  Is it also supported with FreeBSD?  I'm guessing it is.  If so does the pfSense install have everything needed?  Guessing it does but would just like to verify before spending time attempting to make something work that is not going to.</p>
<p dir="auto">As a bonus if someone has the tcpdump command line handy for setting up the remote capture that would be great not having to start from scratch.</p>
</blockquote>
<p dir="auto">I'm not sure I'd feed it into wireshark directly. Lots of corner cases can appear that way. Why not save pcaps, and then load those directly into wireshark?</p>
<p dir="auto">Bro with Timemachine (not AAPL's) and I think Vortex will both capture pcaps for replay.</p>
<p dir="auto">Even easier (but not secure), mount a remote file system and tcpdump to it.</p>
]]></description><link>https://forum.netgate.com/post/525588</link><guid isPermaLink="true">https://forum.netgate.com/post/525588</guid><dc:creator><![CDATA[fatsailor]]></dc:creator><pubDate>Fri, 06 Mar 2015 18:25:05 GMT</pubDate></item><item><title><![CDATA[Reply to Remote Packet Capture on Fri, 06 Mar 2015 09:45:36 GMT]]></title><description><![CDATA[<p dir="auto">Well here it is…</p>
<pre><code>
"C:\Program Files (x86)\PuTTY\plink.exe" -ssh -pw password root@pfSense.localdomain tcpdump -n -nn -s 0 -U -w - -i bfe0 vlan 99 and icmp | "C:\Program Files\Wireshark\wireshark.exe" -i - -k

</code></pre>
<p dir="auto">or if target systems ssh is configured for key authentication, replace password with i option and key file</p>
<pre><code>
"C:\Program Files (x86)\PuTTY\plink.exe" -ssh -i "C:\Program Files (x86)\WinSCP\Keys\pfSense\id_rsa_4096_SSH_Private_Key.ppk" root@pfSense.localdomain tcpdump -n -nn -s 0 -U -w - -i bfe0 vlan 99 and icmp | "C:\Program Files\Wireshark\wireshark.exe" -i - -k

</code></pre>
<p dir="auto">Replace paths, login name, domain name, network interface, filter expression, etc. as appropriate.</p>
<p dir="auto">To prevent tcpdump from putting the network interface into promiscuous mode add the -p option.</p>
]]></description><link>https://forum.netgate.com/post/525424</link><guid isPermaLink="true">https://forum.netgate.com/post/525424</guid><dc:creator><![CDATA[NOYB]]></dc:creator><pubDate>Fri, 06 Mar 2015 09:45:36 GMT</pubDate></item></channel></rss>