久々に設定してみた
導入
$ sudo apt install dns2tcp
適当なサブドメインをNSで設定しておく
dns2tcp IN NS example.com.
server側の設定
$ cat ~/.dns2tcpdrc listen = <HOSTIPADDRESS> port = 53 user=dns2tcp chroot = /var/tmp/dns2tcp/ pid_file = /var/run/dns2tcp.pid domain = dns2tcp.example.com key = oopsoops resources = ssh:127.0.0.1:22
で,とりあえずこんな感じで起動.
$ sudo dns2tcpd -F -f ~/.dns2tcpdrc
client側設定
$ cat ~/.dns2tcprc domain = dns2tcp.example.com resource = ssh local_port = 8022 key = oopsoops debug_level=3
で,clientを起動する
$ dns2tcpc
これでserver側の22とclientの8022が繋がってssh出来るようになる
$ ssh user@localhost 8022
これでWeb閲覧をしたい場合は,-D でDynamic port fowarding するなどする.
$ ssh user@localhost 8022 -D 8080
socks5で 127.0.0.1:8080 な感じでいいはず
$ apt-cache search asciidoctor diagram ruby-asciidoctor-plantuml - extension for Asciidoctor to enable support for PlantUML diagrams $ sudo apt install ruby-asciidoctor-plantuml
$ apt show xautolock Package: xautolock Version: 1:2.2-5.1+b1 Priority: optional Section: x11 Source: xautolock (1:2.2-5.1) Maintainer: Wei Liu <liuw@liuw.name> Installed-Size: 68.6 kB Depends: libc6 (>= 2.7), libx11-6, libxext6, libxss1 Recommends: xtrlock | xscreensaver | i3lock | suckless-tools Tag: hardware::input, interface::graphical, interface::x11, role::program, scope::utility, uitoolkit::gtk, use::monitor, x11::application, x11::screensaver Download-Size: 31.3 kB APT-Manual-Installed: yes APT-Sources: http://ftp.jp.debian.org/debian sid/main amd64 Packages Description: Program launcher for idle X sessions Xautolock monitors input devices under the X Window System, and launches a program of your choice if there is no activity after a user-configurable period of time. You can use this to automatically start up a screen locker if you have left your computer unattended for some period of time. The program launched need not be a screen locker such as xlock.
$ xautolock --help Usage : xautolock [-help][-version][-time mins][-locker locker] [-killtime mins][-killer killer] [-notify margin][-notifier notifier][-bell percent] [-corners xxxx][-cornerdelay secs] [-cornerredelay secs][-cornersize pixels] [-nocloseout][-nocloseerr][-noclose] [-enable][-disable][-toggle][-exit][-secure] [-locknow][-unlocknow][-nowlocker locker] [-restart][-resetsaver][-detectsleep] -help : print this message and exit. -version : print version number and exit. -time mins : time before locking the screen [1 <= mins <= 60]. -locker locker : program used to lock. -nowlocker locker : program used to lock immediately. -killtime killmins : time after locking at which to run the killer [10 <= killmins <= 120]. -killer killer : program used to kill. -notify margin : notify this many seconds before locking. -notifier notifier : program used to notify. -bell percent : loudness of notification beeps. -corners xxxx : corner actions (0, +, -) in this order: topleft topright bottomleft bottomright -cornerdelay secs : time to lock screen in a `+' corner. -cornerredelay secs : time to relock screen in a `+' corner. -cornersize pixels : size of corner areas. -nocloseout : do not close stdout. -nocloseerr : do not close stderr. -noclose : close neither stdout nor stderr. -enable : enable a running xautolock. -disable : disable a running xautolock. -toggle : toggle a running xautolock. -locknow : tell a running xautolock to lock. -unlocknow : tell a running xautolock to unlock. -restart : tell a running xautolock to restart. -exit : kill a running xautolock. -secure : ignore enable, disable, toggle, locknow unlocknow, and restart messages. -resetsaver : reset the screensaver when starting the locker. -detectsleep : reset timers when awaking from sleep. Defaults : time : 10 minutes locker : xlock nowlocker : xlock killtime : 20 minutes killer : none notify : don't notify notifier : none bell : 40% corners : 0000 cornerdelay : 5 seconds cornerredelay : 5 seconds cornersize : 10 pixels Version : 2.2
コメント