Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

For example:

Setting up a server as an secure HTTP proxy to use in a filtered internet connection. Altering a computer's/network's DNS to reroute traffic.

What are some other fun and useful tricks you think we should all know about?

share

locked by Tom O'Connor Feb 20 at 11:45

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. More info: help center.

closed as primarily opinion-based by HopelessN00b, Tom O'Connor Feb 20 at 11:44

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

2  
maybe this should be a wiki? –  pQd Jun 14 '09 at 8:55

8 Answers 8

Screen

(linux & OS X/macports)

It allows console users to run any number of text-based applications, interactive command shells, curses-based applications, text editors etc, within a single terminal.

I barely started using it fluently, thanks to a few online tutorials out there: http://news.softpedia.com/news/GNU-Screen-Tutorial-44274.shtml

Quick reference:

  • Start a new session: #screen -S sessioname
  • Ctrl+a d to detach
  • List running sessions: #screen -ls
  • Connect to running session: #screen -x sessioname

There are some Pros here who might want to add to this post their useful commands for screen.

Here's another useful tutorial

share
    
there is also tmux which does similar job but better :) –  neutrinus Feb 20 at 11:14

Using your host file to send ad crap to localhost.

share
1  
+1. I have always wondered if there was a performance penalty with this method. Never enough to stop me when I KNOW I wanted to block a certain URL or two. Adblock certainly does the trick well enough. –  p.campbell May 28 '09 at 2:20
    
Windows 2000 (and XP before a certain SP level) would experience a performance hit on startup if you had a very large hosts file (such as on created by spybot) as the DNS client service processed the file inefficiently. Not a problem now as far as I kown, and there were workarounds then too (i.e. turn off the DNS client service). –  David Spillett Jun 14 '09 at 9:32
    
blacklist the ads servers in the dns :D –  petrus Jul 21 '10 at 15:47

anycast - we use it for our DNS.

share
    
I admit I don't even know what that is? I thought I'd post it as a separate question: serverfault.com/questions/14985/… –  username May 29 '09 at 18:55

Upside-Down-Ternet

An excellent little trick to play on unsuspecting users. The "kitty war" intermediate idea too.

share
    
+1 kittenwar admin must be proud being chosen for this trick ! –  petrus Jul 21 '10 at 15:48

ssh's various tunneling options

  • -R forward port from remote host to/through the initiating end of the ssh session
  • -L forward port from initiating host through the remote host
  • -D ssh's socks-proxy
share

mostly linux [ and possibly bsd ] relaed:

using openvpn in bridge mode to.. bridge remote ethernet segments. not efficient, but sometimes really helpful.

using netcat instead of ssh to transfer data quickly across secure local network.

using reverse proxy or DNAT combined with SNAT on multihomed host to make some services from network A available to clients in network B when you [ for some political reasons ] have no control over routing between A and B.

using fail2ban to block blind hammering of your ssh / ftp / http and possibly other services.

share
    
+1 for netcat. when they say it's the swiss-army knife for network, they're right. –  petrus Jul 21 '10 at 15:51

Set up some magic in your ~/.ssh/config to do automagic jump host forwarding. Lets you do things like ssh login1%host1+login2%host2+host3 right from the command line without breaking flow to go set up a tunnel and remember the ProxyCommand syntax.

share

clusterssh to execute commands easily on multiple server!

share

Not the answer you're looking for? Browse other questions tagged or ask your own question.