Create a empty /data folder in Fatdog. Unzip the iso (gzip -d command) and burn the iso, boot it, make a note of your Fatdog IP and in Fuguita/OpenBSD run the rsshfs script passing it your Fatdog IP e.g.
Code: Select all
cd /sysmedia
./rsshfs 192.168.1.4
On OpenBSD switch to another console (ctrl-alt-F2) and cd /root/shared and mount a HDD folder ...etc and that will be reflected through to Fatdogs /data folder (mount point).
sshd needs to be running in fatdog and if you've the firewall on (eztables) then you'll need to allow ssh through (see earlier postings).
Likely if unfamilar with OpenBSD you'll have to read up about how to identify and mount things under OpenBSD (also partially outlined in earlier posts). Here's a starter for mounting a USB https://www.cyberciti.biz/faq/openbsd-m ... -harddisk/
Fatdog /etc/ssh/sshd_config
Code: Select all
PermitRootLogin yes
PasswordAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
TCPKeepAlive yes
ClientAliveInterval 60
ClientAliveCountMax 10000
Code: Select all
ENABLE_SYSLOG=1
DENY_SSH_BF=1
DENY_SSH_BF_IP="$DEFAULT_IF"
DENY_SSH_BF_PORT=22
GOOGLE_DNS1=8.8.8.8
GOOGLE_DNS2=8.8.4.4
DNS_SERVERS="
$GOOGLE_DNS1
$GOOGLE_DNS2
"
WEB="
80/tcp
443/tcp
"
DNS="
53/udp
53/tcp
"
NTP="
123/udp
"
SSH="
22/tcp
"
BASIC_SERVICES="
$WEB
$DNS
$NTP
$SSH
"
APPSERVER1=192.168.123.2
allow_in any $eth0 any "$SSH"
allow_out any any any "$BASIC_SERVICES"
allow_icmp any any
# Chain for preventing SSH brute-force attacks.
# Permits 10 new connections within 5 minutes from a single host then drops
# incoming connections from that host. Beyond a burst of 100 connections we
# log at up 1 attempt per second to prevent filling of logs.
-N SSHBRUTE
-A SSHBRUTE -m recent --name SSH --set
-A SSHBRUTE -m recent --name SSH --update --seconds 300 --hitcount 10 -m limit --limit 1/second --limit-burst 100 -j LOG --log-prefix "iptables[SSH-brute]: "
-A SSHBRUTE -m recent --name SSH --update --seconds 300 --hitcount 10 -j DROP
-A SSHBRUTE -j ACCEPT
# Accept worldwide access to SSH and use SSHBRUTE chain for preventing
# brute-force attacks.
-A INPUT -p tcp --dport 22 --syn -m conntrack --ctstate NEW -j SSHBRUTE
Code: Select all
#!/bin/sh
#
# Rufwoof September 2018
#
# OpenBSD LiveCD boot script to mount a local folder /root/shared to a remote /data mountpoint
# using reverse sshfs
# Once mounted you can mount HDD folder(s) to /root/shared on the OpenBSD box so that they
# are accessible from the remote machines /data folder
#
if [ -z $1 ]; then
echo "Usage rsshfs <IP>"
echo
echo " Reverse sshfs mounts local folder /root/shared as a mount point /data on <IP>"
echo " remote machines /data folder must already exist and be empty"
exit
fi
if [ ! -d /root/shared ]; then
mkdir /root/shared
fi
if [ ! -d /root/shared ]; then
echo "Unable to find/create /root/shared"
exit
fi
fifo=/tmp/rsshfs-$$
rm -f "$fifo"
mkfifo -m600 "$fifo" &&
< "$fifo" /usr/libexec/sftp-server |
ssh root@$1 sshfs -o slave :/root/shared /data '' > "$fifo"
rm "$fifo"
(see http://fuguita.org/index.php?FuguIta%2FBBS%2F7#h328b23e)5. optional: If you made a directory called "livecd-config" on any FFS partition, you can save all your files, installed packages, etc on Running FuguIta, then you can load them at next boot.