hi , i needed some port forwarding with socat or anything to connect my vps2 to my vps1 and load user and pass from it . i use vps1 and vps2 for openssh vpn so my users can get free internet without any filtering , someone helped me and i managed to port forward my ssh and load the user data on my vps1 with making this service file :
[Unit] Description=SSH Forwarding Service After=network.target [Service] User=nobody ExecStart=/usr/bin/socat TCP-LISTEN:22,fork,reuseaddr TCP:vps1.example.com:22 [Install] WantedBy=multi-user.target
but i also have v2ray panel on my vps1 with 2 config , one of em on port 443 with TLS on and cer , key file on my vps1 , the other on port 13081 without TLS . so i made 2 more file like this :
[Unit] Description=SSH Forwarding Service After=network.target [Service] User=nobody ExecStart=/usr/bin/socat TCP-LISTEN:13081,fork,reuseaddr TCP:vps1.example.com:13081 [Install] WantedBy=multi-user.target
both port 2255 and 13081 works fine but the port 443 that has TLS config doesnt work .
when i use this :
socat TCP-LISTEN:2255,fork TCP:sd1.aronashop.xyz:2255|socat TCP-LISTEN:443,fork TCP:sd1.aronashop.xyz:443|socat TCP-LISTEN:13081,fork TCP:sd1.aronashop.xyz:13081
all work fine even port 443 but the problem is when i close the SSH window it stops .
so how can i fix this port 443 problem ? i tried so many ways but none of em worked
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.