Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

建议tssh添加支持, 类似ssh tun的VPN #148

Open
engcn opened this issue Sep 22, 2024 · 0 comments
Open

建议tssh添加支持, 类似ssh tun的VPN #148

engcn opened this issue Sep 22, 2024 · 0 comments

Comments

@engcn
Copy link

engcn commented Sep 22, 2024

ssh使用示例:
ssh ‐f ‐w 0:1 192.168.1.15 true

   SSH‐BASED VIRTUAL PRIVATE NETWORKS
   ssh contains support for Virtual Private Network (VPN) tunnelling  using  the  tun(4)
   network   pseudo‐device,   allowing   two   networks  to  be  joined  securely.   The
   sshd_config(5) configuration option PermitTunnel controls whether the server supports
   this, and at what level (layer 2 or 3 traffic).

   The following example would connect client network 10.0.50.0/24 with  remote  network
   10.0.99.0/24  using  a  point‐to‐point connection from 10.1.1.1 to 10.1.1.2, provided
   that the SSH server running on the gateway to the remote  network,  at  192.168.1.15,
   allows it.

   On the client:
         # ssh ‐f ‐w 0:1 192.168.1.15 true
         # ifconfig tun0 10.1.1.1 10.1.1.2 netmask 255.255.255.252
         # route add 10.0.99.0/24 10.1.1.2

   On the server:
         # ifconfig tun1 10.1.1.2 10.1.1.1 netmask 255.255.255.252
         # route add 10.0.50.0/24 10.1.1.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant