Posts Tagged tutorial

Xubuntu Remote Desktop (VNC)

Posted by on Friday, 22 May, 2009

Xubuntu 8.10 has no remote desktop / vnc server setup by default.

This will allow us to simply remote desktop the console session (must be logged in to work), which is all I need.

sudo apt-get install x11vnc
x11vnc -storepasswd

Put this into a script and make it executable:

#!/bin/bash
# Start x11vnc, require password, shared sessions, keep running when clients disconnect, and something...
/usr/bin/x11vnc -usepw -shared -forever -noxdamage &

And add to Applications > Settings > Settings Manager > Autostarted Apps


Throttle SSH Connections

Posted by on Friday, 22 May, 2009

I run this on my VPS to throttle SSH connections from dictionary attacks (OR disable keyboard based auth and alow only shared keys. No key, no access!).

Configure your services properly rather than relying on a firewall to secure you against lazy configurations.  This is all I use  IPTables for.

/etc/network/iptables.conf

#!/bin/bash
# iptables script.
#
# These lines are here in case rules are already in place and the script is ever rerun on the fly.
# We want to remove all rules and pre-exisiting user defined chains and zero the counters
# before we implement new rules.
/sbin/iptables -F
/sbin/iptables -X
/sbin/iptables -Z
/sbin/ip6tables -F
/sbin/ip6tables -X
/sbin/ip6tables -Z
# Drop all IPv6 connections.
/sbin/ip6tables -P INPUT DROP
# Create SSH chain.
/sbin/iptables -N SSH
/sbin/iptables -A SSH -m state --state NEW -m recent --update --seconds 600 --hitcount 3 -j DROP
/sbin/iptables -A SSH -p tcp -m state --state NEW -m recent --set
/sbin/iptables -A SSH -p tcp -j ACCEPT
# Jump ssh trffic to SSH chain.
/sbin/iptables -A INPUT -p tcp --dport 22 -j SSH

Installing Fonts

Posted by on Friday, 22 May, 2009

Best monospaced font ever is Consolas from Microsoft. It’s installed with the Office 2007/03 Compatibility Pack and with Office 2007. So you’ll need an instance of Windows with Office 2003/07 to get this font, it also comes with Visual Studio I think (as that is what this font was designed for, people looking at code all day)..

I also installed this font in Xubuntu for use as my terminal font.  Doesnt look quite as nice on Linux/Xubuntu as it does on Windows, but it was still the one I liked the most for my terminal.

For TrueType fonts, make a directory and copy the .ttf files:

/usr/share/fonts/truetype/<font_name>

Rebuild the font cache thing:

fc-cache -f -v