Closed unjust closed 5 years ago
Dummy gummy stepbystep instructions https://dev.to/lax/rtmps-relay-with-stunnel-12d3
I think we tried this before, but we probably fucked up somehow... its the same post as we tried above ^^^ wanna try it out and see if you can get it working?
tracking progress here step by step
apt install stunnel4
might be ok but get this warning?
Warning: The home dir /var/run/stunnel4 you specified can't be accessed: No such file or directory
also can't seem to create the config files - even with sudo?
I changed root password with sudo passwd
to something simple .
https://stackoverflow.com/questions/35016795/get-root-password-for-google-cloud-engine-vm .
the I su root
to create the config files (I just used vi)
looking at this https://www.stunnel.org/config_unix.html after running into this error:
cat <<EOF > /etc/stunnel/conf.d/fb.conf
> [fb-live]
> client = yes
> accept = 127.0.0.1:19350
> connect = live-api-s.facebook.com:443
> verifyChain = no
> EOF
-bash: /etc/stunnel/conf.d/fb.conf: No such file or directory
I ended up creatinbg the dir as root and then dropping the config in
root@instance-template-ubuntu-1404-4-stunnel:/home/unjust# vi /etc/stunnel/stunnel.conf
root@instance-template-ubuntu-1404-4-stunnel:/home/unjust# cd /etc/stunnel/
root@instance-template-ubuntu-1404-4-stunnel:/etc/stunnel# mkdir conf.d
root@instance-template-ubuntu-1404-4-stunnel:/etc/stunnel# cat <<EOF > /etc/stunnel/conf.d/fb.conf
> [fb-live]
> client = yes
> accept = 127.0.0.1:19350
> connect = live-api-s.facebook.com:443
> verifyChain = no
> EOF
root@instance-template-ubuntu-1404-4-stunnel:/etc/stunnel#
I had to apt-get install systemd
install systemd
to use systemctl
but still doesnt seem to work so starting manually
stunnel /etc/stunnel/stunnel.conf
By default, stunnel uses /var/log/secure to log its output.
To terminate stunnel, kill the process by running the following command as root:
~]# kill `cat /var/run/stunnel/stunnel.pid`
also inlined the fb conf config (removed the include directive)
I had to also remove some args include, verify.. from the conf, oh and EOF ;-)
stunnel4 /etc/stunnel/stunnel.conf
Clients allowed=500
stunnel 4.53 on x86_64-pc-linux-gnu platform
Compiled with OpenSSL 1.0.1e 11 Feb 2013
Running with OpenSSL 1.0.1f 6 Jan 2014
Update OpenSSL shared libraries or rebuild stunnel
Threading:PTHREAD SSL:+ENGINE+OCSP Auth:LIBWRAP Sockets:POLL+IPv6
Reading configuration from file /etc/stunnel/stunnel.conf
Compression not enabled
PRNG seeded successfully
Initializing service section [fb-live]
SSL options set: 0x00000004
Configuration successful
Service [fb-live] (FD=12) bound to 127.0.0.1:19350
setgid: Operation not permitted (1)
Service [fb-live] closed (FD=12)
str_stats: 11 block(s), 1197 data byte(s), 638 control byte(s)
unjust@instance-template-ubuntu-1404-4-stunnel:/etc/stunnel$ sudo stunnel4 /etc/stunnel/stunnel.conf
but now at least we get the pid
other stuff https://hamy.io/post/0012/how-to-install-and-configure-stunnel-on-ubuntu/
Got this working with a user created network, a stunnel image, cretaing confs for stunnel.
We went by this post to set up stunnel on our instance https://dev.to/lax/rtmps-relay-with-stunnel-12d3
but hit a wall when starting the service
systemctl restart stunnel4 && systemctl status stunnel4
output: