iw4p / OpenConnect-Cisco-AnyConnect-VPN-Server-OneKey-ocserv

[Script and Docker 🐳] OpenConnect (Cisco AnyConnect) VPN Server (OCServ) script one key easy configurator and installer
255 stars 133 forks source link

How to run on different port and tunnel from another server #9

Closed SniperTomb closed 1 year ago

SniperTomb commented 1 year ago

Hi Thanks for amazing script

I saw only 1 iptables command that iptables -t nat -A POSTROUTING -j MASQUERADE! what should I do if want to start service on another port?

and another question is , I have a censored network but with a vps in my country I can access to uncensored network how I can tunnel openconnect with iptables or firewalld in my country vps to my openconnect server?

btw I config open connect on Centos 7 and its work great , just want to tunnel from my country server to my openconnect server because sometimes I can't access directly to my openconnect server

Thanks in Advance. <3

iw4p commented 1 year ago

Hello,

For more info about port or configure it manually, check this out: https://ocserv.gitlab.io/www/recipes-ocserv-firewall-iptables-ipv4.html

You can install and use tmux on your second VPS (Iran) to save the session, then you have many options to do that, firstly you can install openconnect client and connect it to your non-Iranian VPS from Iranian VPS. Another option is Sshuttle. You can use this tool to forward over SSH port 22. Without any setting on server (destination, non-Iranian server). Just install it on Iranian server and run sshuttle -r USER@IP 0/0. You can use WsTunnel. Also, you can use SSH tunnel. Check this out.

SniperTomb commented 1 year ago

Hi again

Thank for the answer I thought I don't have a location in my profile :)) btw now I saw your profile !!!

Let me clear my purpose a bit better

I have 2-3 server outside of Iran , that I installed ocserver one manually another one with a Chinese script because your script tested on Ubuntu as I use CentOS I want to tunnel a client all traffic from Iran server to 2-3 server outside of Iran with different ports For e.g. : server1-iran:4430 to server2-germany:443 server1-iran:4433 to server3-netherland:443 server1-iran:4434 to server4-finland:443

sshuttle and your advised tunnels are user based , I just want to tunnel all traffic from client to Iran-Server to Foreign Server's

I will whis u in Linkedin for better language xD ty mate <3

SniperTomb commented 1 year ago

I can't message u in LinkedIn , can you suggest me a place to reach u ? I'm Sniper Tomb in LinkedIn if u want message me!!

iw4p commented 1 year ago

I can't message you on LinkedIn. You can contact me via email or continue here.