Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/tundPublic

SSH reverse tunnel daemon

License

NotificationsYou must be signed in to change notification settings

aphyr/tund

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tund (tunneling daemon) establishes a reverse SSH tunnel from some publicallyaccessible computer to your own. In the event of theft or loss, you can log into your machine as soon as it connects to the internet.It's also useful for machines behind a NAT you'd like to have a tunnel to.You need two computers: the local host (say, your laptop), and the remote host,which is on the internet. Tund will use SSH forwarding to connect a port on theremote host to a port on the local host. You can then ssh -p <some-port>remote.com to access your local host.First, edit the options in bin/tund.Install tund and generate a passwordless SSH keypair. I've included an upstartsetup script for you, which should work on Ubuntu.  local$ sudo bin/setupCreate a user on the remote host  remote# adduser --disabled-password --shell /bin/false tunnel  remote# cd ~tunnel  remote# rm .bash* .profileOn the tunneling host, create .ssh/authorized_keys  remote# mkdir .ssh  remote# $VISUAL .ssh/authorized_keysand paste the public key into that file.Lock down the user's homedir  remote# chown -R tunnel:tunnel ~tunnel  remote# chmod 400 .ssh/authorized_keys  remote# chmod 500 . .sshConfirm that you can establish a tunnel:  local$ ssh -vgN -i etc/tund/key -R 2222:localhost:22 tunnel@remote.comYou can re-run bin/setup any time to make changes.I suggest leaving a honeypot account available on your local machine. It willencourage laptop thiefs to use the machine as-is. When they connect it to thenetwork, you'll be able to recover it. Conversely, any user capable of runninga privilege escalation attack has already won, when physical access isavailable.

About

SSH reverse tunnel daemon

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp