2024-08-10 01:47:22 +00:00
|
|
|
#!/bin/bash
|
2024-08-10 13:12:26 +00:00
|
|
|
# Container goal: egress
|
|
|
|
# first: physical_box$ autossh -N -R 11111:localhost:11434 -i sshtun/oilykey/<SOMEKEY> -p 22222 <rem_vps_url>
|
|
|
|
# will forward rem_c_port:physical_box:physical_box_port ...some args... rem_vps_p rem_vps_url
|
|
|
|
# then: frontnet_c$ curl sshtun.frontnet:11112 --> physical_box:11434
|
2024-08-10 01:47:22 +00:00
|
|
|
|
2024-08-10 13:12:26 +00:00
|
|
|
if $USE_TUN ; then
|
|
|
|
echo "@@@@@@@@@@ SSH TUNNEL ENABLED BY ENV"
|
|
|
|
nohup socat TCP-LISTEN:11112,fork TCP:localhost:11111 &
|
|
|
|
/usr/sbin/sshd -De
|
|
|
|
else
|
|
|
|
echo "@@@@@@@@@@ SSH TUNNEL DISABLED BY ENV"
|
|
|
|
fi
|
2024-08-10 01:47:22 +00:00
|
|
|
|