FMADIO Shark v2 is a full Ubuntu 22 Linux Container (LXC) enabling the full Wireshark GUI and RDP desktop enviroment all running on the FMADIO Hardware Platform.
Step 1) Download the LXC
Download the latest version of fshark from the web
https://static.fmad.io/container.html#fshark2
This can be done using CURL in the following directory
cd /opt/fmadio/lxc
Then Downloading using the CURL command (assuming the FMADIO System has internet access). Alternatively the tarball can be copied from a remote system into the same directory.
Step 2) Extract the tarball
Extract the tarball as sudo
sudo tar xfzv fshark2-20241021-1204.tar.gz
Example output below:
fmadio@fmadio200v4-636:/opt/fmadio/lxc$ sudo tar xfzv fshark2-20241021-1204.tar.gz
fshark2-20241021-1204/
fshark2-20241021-1204/fmadiocli-start.lua
fshark2-20241021-1204/install.lua
fshark2-20241021-1204/fmadiocli-del.lua
fshark2-20241021-1204/config
fshark2-20241021-1204/backup.lua
fshark2-20241021-1204/fmadiocli-stop.lua
fshark2-20241021-1204/rootfs/
fshark2-20241021-1204/rootfs/sys/
fshark2-20241021-1204/rootfs/proc/
fshark2-20241021-1204/rootfs/home/
fshark2-20241021-1204/rootfs/home/fmadio/
fshark2-20241021-1204/rootfs/home/fmadio/.bash_logout
fshark2-20241021-1204/rootfs/home/fmadio/.vimrc
fshark2-20241021-1204/rootfs/home/fmadio/.bashrc
fshark2-20241021-1204/rootfs/home/fmadio/.config/
fshark2-20241021-1204/rootfs/home/fmadio/.config/wireshark/
fshark2-20241021-1204/rootfs/home/fmadio/.config/wireshark/profiles/
fshark2-20241021-1204/rootfs/home/fmadio/.config/tint2/
fshark2-20241021-1204/rootfs/home/fmadio/.config/tint2/tint2rc
fshark2-20241021-1204/rootfs/home/fmadio/.config/openbox/
fshark2-20241021-1204/rootfs/home/fmadio/.config/openbox/autostart
fshark2-20241021-1204/rootfs/home/fmadio/.Xauthority
fshark2-20241021-1204/rootfs/home/fmadio/fmadio-background.png
fshark2-20241021-1204/rootfs/home/fmadio/wireshark-lua/
fshark2-20241021-1204/rootfs/home/fmadio/wireshark-lua/Cboe/
fshark2-20241021-1204/rootfs/home/fmadio/wireshark-lua/Cboe/Cboe_Futures_OrderEntry_Boe3_v1_0_Dissector.lua
fshark2-20241021-1204/rootfs/home/fmadio/wireshark-lua/Cboe/Cboe_Pitch_SequencedUnitHeader_Pitch_v1_0_Dissector.lua
fshark2-20241021-1204/rootfs/home/fmadio/wireshark-lua/Cboe/Cboe_Edgx_Equities_DepthOfBook_Pitch_v2_41_29_Dissector.lua
fshark2-20241021-1204/rootfs/home/fmadio/wireshark-lua/Cboe/ReadMe.md
fshark2-20241021-1204/rootfs/home/fmadio/wireshark-lua/Cboe/Cboe_Options_Complex_Pitch_v2_1_37_Dissector.lua
fshark2-20241021-1204/rootfs/home/fmadio/wireshark-lua/Cboe/Cboe_Options_DepthOfBook_Pitch_v2_39_4_Dissector.lua
fshark2-20241021-1204/rootfs/home/fmadio/wireshark-lua/Cboe/Cboe_Options_MarketLevel2_Csm_v1_0_4_Dissector.lua
.
.
.
fshark2-20241021-1204/rootfs/opt/google/chrome/libqt6_shim.so
fshark2-20241021-1204/rootfs/opt/google/chrome/MEIPreload/
fshark2-20241021-1204/rootfs/opt/google/chrome/MEIPreload/preloaded_data.pb
fshark2-20241021-1204/rootfs/opt/google/chrome/MEIPreload/manifest.json
fshark2-20241021-1204/rootfs/opt/google/chrome/product_logo_256.png
fshark2-20241021-1204/rootfs/opt/google/chrome/vk_swiftshader_icd.json
fshark2-20241021-1204/rootfs/opt/google/chrome/chrome_100_percent.pak
fshark2-20241021-1204/rootfs/opt/google/chrome/xdg-settings
fshark2-20241021-1204/rootfs/opt/google/chrome/google-chrome
fshark2-20241021-1204/rootfs/opt/google/chrome/product_logo_32.png
fshark2-20241021-1204/rootfs/opt/google/chrome/chrome
fshark2-20241021-1204/rootfs/opt/google/chrome/default-app-block
fshark2-20241021-1204/rootfs/opt/google/chrome/chrome_200_percent.pak
fshark2-20241021-1204/rootfs/opt/google/chrome/chrome-sandbox
fshark2-20241021-1204/rootfs/run/
fshark2-20241021-1204/rootfs/srv/
fshark2-20241021-1204/rootfs/sbin
fshark2-20241021-1204/fmadiocli-add.lua
fmadio@fmadio200v4-636:/opt/fmadio/lxc$
Step 3) Install the LXC
Installing the LXC will configure it for the system, all commands need to be run as root
sudo su
Then cd to the extracted fshark2 directory
fmadio@fmadio200v4-636:/opt/fmadio/lxc$ sudo su
root@fmadio200v4-636:/mnt/store1/lxc/lib/lxc# cd fshark2-20241021-1204/
root@fmadio200v4-636:/mnt/store1/lxc/lib/lxc/fshark2-20241021-1204#
Then run the install script
./install.lua
Example output below:
root@fmadio200v4-636:/mnt/store1/lxc/lib/lxc/fshark2-20241021-1204# ./install.lua
fmad fmadlua Dec 16 2024 (/opt/fmadio/bin/fmadiolua --nocal ./install.lua )
Disable cycle calibration
man0 imported
man0 ipv4 addr [nil]
man0 ipv4 netmask [nil]
man0 ipv4 gw [nil]
man0 ipv4 dns [nil]
lxcname [nil]
lxcbuild [nil]
nat [y]
fmad fmadlua Dec 16 2024 (/opt/fmadio/bin/fmadiolua --nocal /opt/fmadio/bin/fmadiocli version )
Disable cycle calibration
done 0.003627Sec 0.000060Min
-----------------------------------------------
[Tue Dec 17 12:15:53 2024] CmdLine [version]
[Tue Dec 17 12:15:53 2024] Cmd [version ]
-----------------------------------------------
fmadiocliPresent = true
fshark2-20241021-1204
rm config
mkdir /opt/fmadio/lxc/fshark2-20241021-1204/data/ -p
mkdir /opt/fmadio/lxc/fshark2-20241021-1204/log/ -p
----------------------
IP : nil
CIDR : nil
GW : nil
DNS : nil
Nat : y
/opt/fmadio/bin/fmadiocli "config ring add lxc_fshark2"
fmad fmadlua Dec 16 2024 (/opt/fmadio/bin/fmadiolua --nocal /opt/fmadio/bin/fmadiocli config ring add lxc_fshark2 )
Disable cycle calibration
[Tue Dec 17 12:15:53 2024] CmdLine [config ring add lxc_fshark2]
[Tue Dec 17 12:15:53 2024] Cmd [config ring add lxc_fshark2 ]
[Tue Dec 17 12:15:53 2024] ---------------------------------------------------------------------------------------------------------------------------------
[Tue Dec 17 12:15:53 2024] Created Ring named [lxc_fshark2]
cycle calibration disabled
null output
RING reset
RING file [/opt/fmadio/queue/lxc_fshark2]
RING[/opt/fmadio/queue/lxc_fshark2 ] Size missmatch 0 12595200
RING[/opt/fmadio/queue/lxc_fshark2 ] Size : 12595200 16777216
RING[/opt/fmadio/queue/lxc_fshark2 ] Version: 0 100
RING[/opt/fmadio/queue/lxc_fshark2 ] version wrong force reset
RING[/opt/fmadio/queue/lxc_fshark2 ] Put:0 0 0x7f284e62f000
RING[/opt/fmadio/queue/lxc_fshark2 ] Get:0 0 0x7f284e630000
[Tue Dec 17 12:15:54 2024] created ring [/opt/fmadio/queue/lxc_fshark2]
done 0.721891Sec 0.012032Min
rm /opt/fmadio/lxc/fshark2-20241021-1204/rootfs/etc/resolv.conf
touch /opt/fmadio/lxc/fshark2-20241021-1204/rootfs/etc/resolv.conf
echo fmadio200v4-636-fshark2 > /opt/fmadio/lxc/fshark2-20241021-1204/rootfs/etc/hostname
echo 127.0.0.1 fmadio200v4-636-fshark2 >> /opt/fmadio/lxc/fshark2-20241021-1204/rootfs/etc/hosts
/opt/fmadio/bin/fmadiocli "config lxc add fshark2-20241021-1204"
fmad fmadlua Dec 16 2024 (/opt/fmadio/bin/fmadiolua --nocal /opt/fmadio/bin/fmadiocli config lxc add fshark2-20241021-1204 )
Disable cycle calibration
[Tue Dec 17 12:15:54 2024] CmdLine [config lxc add fshark2-20241021-1204]
[Tue Dec 17 12:15:54 2024] Cmd [config lxc add fshark2-20241021-1204 ]
[Tue Dec 17 12:15:54 2024] Added container [fshark2-20241021-1204] to the configuration
done 0.708595Sec 0.011810Min
done
done 1.451537Sec 0.024192Min
root@fmadio200v4-636:/mnt/store1/lxc/lib/lxc/fshark2-20241021-1204#
Step 4) Start the LXC
Using the fmadiocli
start and attach to the LXC to confirm it runs correctly
fmadiocli "config lxc start fshark2"
Example output:
fmadio@fmadio200v4-636:/opt/fmadio/lxc$ fmadiocli "config lxc start fshark2"
fmad fmadlua Dec 16 2024 (/opt/fmadio/bin/fmadiolua --nocal /opt/fmadio/bin/fmadiocli config lxc start fshark2 )
Disable cycle calibration
[Tue Dec 17 12:17:11 2024] CmdLine [config lxc start fshark2]
[Tue Dec 17 12:17:11 2024] Cmd [config lxc start fshark2 ]
[Tue Dec 17 12:17:11 2024] search for lxc named (fshark2)
[Tue Dec 17 12:17:11 2024] [ 1] * fshark2-20241021-1204
[Tue Dec 17 12:17:11 2024] sudo lxc-start -n fshark2-20241021-1204 --logfile /tmp/lxc_fshark2-20241021-1204_1734409031479305984
[Tue Dec 17 12:17:35 2024]
[Tue Dec 17 12:17:35 2024] use the following on a shell to attach to the conatiners console
[Tue Dec 17 12:17:35 2024] sudo lxc-attach -n fshark2-20241021-1204
[Tue Dec 17 12:17:35 2024]
done 23.737702Sec 0.395628Min
fmadio@fmadio200v4-636:/opt/fmadio/lxc$
Step 5) Attach to the LXC
Next is attach to the LXC as follows. This confirms everything is running as expected
fmadiocli "config lxc attach fshark2"
Example output:
fmadio@fmadio200v4-636:/opt/fmadio/lxc$ fmadiocli "config lxc attach fshark2"
fmad fmadlua Dec 16 2024 (/opt/fmadio/bin/fmadiolua --nocal /opt/fmadio/bin/fmadiocli config lxc attach fshark2 )
Disable cycle calibration
[Tue Dec 17 12:19:10 2024] CmdLine [config lxc attach fshark2]
[Tue Dec 17 12:19:10 2024] Cmd [config lxc attach fshark2 ]
[Tue Dec 17 12:19:10 2024] search for lxc named (fshark2)
[Tue Dec 17 12:19:10 2024] [ 1] * fshark2-20241021-1204
[Tue Dec 17 12:19:10 2024] sudo lxc-attach -n fshark2-20241021-1204
root@fmadio200v4-636-fshark2:/#
NOTE: FMADIO Applications the prompt will be GREEN when inside a container. This helps identify on the shell if its running on the host or in an LXC.
Step 6) Setup Port forwarding for RDP
By default the LXC runs on its own internal network without any access to the physically connected network. A typical install will port forward a host port into the LXC RDP server. This allows an RDP client to connect to the FShark2 LXC using the FMADIO Hosts IP address.
Its described in the link below
https://docs4.fmad.io/docs/fmadio-os-network-topology#lxc-port-forwarding
In this example we are forwarding port 3389 on the host (default RDP port) into the LXC FShark2 container on the same port. This effectively lets you RDP to the FMADIO Host using an RDP connection.
Copy the file located in
cp /opt/fmadio/etc_ro/iptables_portfwd.conf /opt/fmadio/etc/iptables.conf
Then reload the iptables configuration
sudo iptables-restore < /opt/fmadio/etc/iptables.conf
Step 7) Connect using an RDP Client
Load up the RDP client and try connect to the instance
Note that the size of the desktop is configured by the RDP client. In this case a 2K configuration is used
If using the native Windows RDP client it will provide a warning, click YES
Showing the default FMADIO login per below
Step 8) Login to the desktop
Login using the account fmadio and the default fmadio password
By default wireshark will load per below
Terminal can be opened using the right mouse button on the desktop
NOTE: The first window may take 30sec to be created as the system initializes itself
Browser can also be created