So, in a nutshell:
I'm looking for a way to automatically generate an "ip route add" command, and execute it, using the connected ip address in stunnel.
In the stunnel log file I see these entries when I connect remotely to stunnel from my phone:
I want to be able to capture that IP address (xxx.xxx.xxx.xxx) and generate the following command to add that route:
I'm pretty good with Python and Bash scripts, and I've read over the stunnel docs, but I can't find anyway to have a script execute when stunnel connects and pass that IP address to it.
I know in OpenVPN, there are the 'up' and 'down' commands that allow you to execute scripts when a connection is made and lost, but I don't see anything like that in stunnel.
Any ideas or suggestions or where to look?
Thanks!
I'm looking for a way to automatically generate an "ip route add" command, and execute it, using the connected ip address in stunnel.
In the stunnel log file I see these entries when I connect remotely to stunnel from my phone:
Code:
Service [home] accepted connection from xxx.xxx.xxx.xxx:yyyy
Code:
ip route add xxx.xxx.xxx.xxx via 192.168.1.1 dev eth0 proto static
I know in OpenVPN, there are the 'up' and 'down' commands that allow you to execute scripts when a connection is made and lost, but I don't see anything like that in stunnel.
Any ideas or suggestions or where to look?
Thanks!
Statistics: Posted by Prof. R. Myrkr — Sat Oct 05, 2024 8:52 am