Showing posts with label port. Show all posts
Showing posts with label port. Show all posts

Friday, December 13, 2013

Vim.js

I'm not sure what utility this provides, but it's a pretty darn cool hack. Kudos to Lu Wang for this Javascript port of Vim. http://coolwanglu.github.io/vim.js/web/vim.html

Wednesday, August 20, 2008

What's Stealing That Port?

If something is bound to a port, and you want to know what it is, you can use the fuser command to determine what's attached. This is particularly handy if some rogue process has stolen port 80, and you want to know what it is.

root@travis-ubuntu:/home/travis# fuser -v http/tcp
USER PID ACCESS COMMAND
http/tcp: root 5950 F.... apache2
www-data 19140 F.... apache2
www-data 21501 F.... apache2
www-data 21508 F.... apache2
www-data 21521 F.... apache2
www-data 23207 F.... apache2
www-data 23209 F.... apache2
www-data 23245 F.... apache2
www-data 23353 F.... apache2
www-data 23460 F.... apache2
www-data 23555 F.... apache2

Friday, March 14, 2008

Remote Port Forwarding over SSH

Consider the following scenario. You have a remote machine that you have access to, and you have enough control to bind a process to an arbitrary port. You also have a workstation that isn't exposed to the outside world, but you would like to access this workstation from outside of your LAN/firewall. Sure you can setup a VPN, configure port forwarding on your router, etc... As usual, there are lots of solutions, but not many are as cool as this quick little ssh hack.

On your workstation:

ssh -Nf -R 9000:localhost:22 username@publicserver.com

This assumes you can bind to port 9000 via the loopback on the remote server and that you're running sshd on port 22 on your local workstation. Now you drive to the local coffeehouse, and you need to hop on your Linux box at home...

Log into publicserver.com:

ssh -p 9000 username@localhost

In this case, username is your account on your workstation behind the firewall.

Thanks to Nate G. for this tip.