Today's Sweetmorn, the 68th day of Discord in the YOLD 3178.

Ubuntu Natty: activate old scrollbars in Ubuntu Classic

2011-05-04 by xpheas
Natty comes with new overlay scrollbars. The work fine in the filebrowser but not in Eclipse (the overlay does not appear). So i deactivated the new scrollbars to get the old one back.
BASH-Code:
1
2
sudo su
echo "export LIBOVERLAY_SCROLLBAR=0" > /etc/X11/Xsession.d/80-disableoverlayscrollbars

  » comments (1)

Port forwarding with iptables

2011-02-27 by xpheas
I am using a Linux gateway with an public IP-address to access the Internet.
To access an internal machine on port 80 beind the gateway from outside I created the following forwarding rule (iptables).
BASH-Code:
1
2
iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j DNAT --to 192.168.100.50:80
iptables -A INPUT -p tcp -m state --state NEW --dport 80 -i eth0 -j ACCEPT

The first rule does the forwaring job, the second allows new incomming connections on port 80.

Now the webserver on Port 80 behind the gateway is accessible over the public IP.

  » comments (0)

Guake Terminal

2011-02-16 by xpheas
Want a really cool terminanl?
Check out Guake. Guake is a top-down terminal for Gnome.

guake-terminal

  » comments (0)

Mount a remote share using SSHFS

2011-01-05 by xpheas
Install SSHFS on you local machine:
BASH-Code:
1
apt-get install sshfs

Add your user to the fuse group
BASH-Code:
1
sudo gpasswd -a $USER fuse

Create the mount point
BASH-Code:
1
mkdir ~/remote_share

Now we can mount the remote share
BASH-Code:
1
sshfs -o idmap=user $USER@host:/path/to/share ~/remote_share

To unmount type:
BASH-Code:
1
fusermount -u ~/remote_share

To add the share permanetly add it to your fstab
BASH-Code:
1
nano /etc/fstab

BASH-Code:
1
sshfs#$USER@host:/path/to/share /home/$USER/remote_share fuse users,exec,allow_other,_netdev,reconnect,transform_symlinks,uid=1000,gid=1000,defaults,idmap=user 0 0

For passwordless authentication put your public rsa key on the remote machine.

  » comments (0)

SOCKS Proxy over SSH Tunnel

2010-11-03 by xpheas
If you are in a foreign network and want to secure up your HTTP traffic you can use an SSH Tunnel:
BASH-Code:
1
ssh user@host -NfD 8080

Configure Firefox:

SOCKS-Host: localhost
Port: 8080

To tunnel DNS lookups open about:config and change network.proxy.socks_remote_dns to true

  » comments (0)

Ubuntu Maverick new default font

2010-10-05 by xpheas
If you don't like the new Ubuntu font go to System > Preferences > Appearance > Fonts and restore the old settings:

Application font: Sans 10
Document font: Sans 10
Desktop font: Sans 10
Window title font: Sans Bold 10
Fixed width font: Monospace 10

  » comments (0)

Extract single file from tar archive

2010-10-04 by xpheas
BASH-Code:
1
tar -xfvz backup.tar.gz home/xpheas/file.txt

Extracts only the file "file.txt".

  » comments (0)

Debian inetd restart

2010-08-13 by xpheas
After configuring /etc/inetd.conf
BASH-Code:
1
/etc/init.d/openbsd-inetd restart

  » comments (0)

SSH Tunneling

2010-08-11 by xpheas
My DSL-modem only supports insecure telnet, but on my Debian Server runs OpenSSH.
So i can tunnel a Telnet session through an SSH connection:
BASH-Code:
1
ssh user@host -NfL 9023:192.168.1.1:23

  -N no interactive ssh session
  -f background
  -L local port

Now i can connect to my modem:
BASH-Code:
1
telnet localhost 9023

  » comments (0)

Delete a line with sed

2010-08-09 by xpheas
BASH-Code:
1
sed '42d' in.txt > out.txt

Deletes line number 42

  » comments (0)

 « newer Posts  older Posts »