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:
| sudo su echo "export LIBOVERLAY_SCROLLBAR=0" > /etc/X11/Xsession.d/80-disableoverlayscrollbars |
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).
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.
To access an internal machine on port 80 beind the gateway from outside I created the following forwarding rule (iptables).
BASH-Code:
| 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.
Guake Terminal
2011-02-16 by xpheasMount a remote share using SSHFS
2011-01-05 by xpheas
Install SSHFS on you local machine:
Add your user to the fuse group
Create the mount point
Now we can mount the remote share
To unmount type:
To add the share permanetly add it to your fstab
For passwordless authentication put your public rsa key on the remote machine.
BASH-Code:
| apt-get install sshfs |
Add your user to the fuse group
BASH-Code:
| sudo gpasswd -a $USER fuse |
Create the mount point
BASH-Code:
| mkdir ~/remote_share |
Now we can mount the remote share
BASH-Code:
| sshfs -o idmap=user $USER@host:/path/to/share ~/remote_share |
To unmount type:
BASH-Code:
| fusermount -u ~/remote_share |
To add the share permanetly add it to your fstab
BASH-Code:
| nano /etc/fstab |
BASH-Code:
| 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.
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:
Configure Firefox:
SOCKS-Host: localhost
Port: 8080
To tunnel DNS lookups open about:config and change network.proxy.socks_remote_dns to true
BASH-Code:
| 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
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
Application font: Sans 10
Document font: Sans 10
Desktop font: Sans 10
Window title font: Sans Bold 10
Fixed width font: Monospace 10
Extract single file from tar archive
2010-10-04 by xpheasBASH-Code:
| tar -xfvz backup.tar.gz home/xpheas/file.txt |
Extracts only the file "file.txt".
Debian inetd restart
2010-08-13 by xpheas
After configuring /etc/inetd.conf
BASH-Code:
| /etc/init.d/openbsd-inetd restart |
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:
-N no interactive ssh session
-f background
-L local port
Now i can connect to my modem:
So i can tunnel a Telnet session through an SSH connection:
BASH-Code:
| 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:
| telnet localhost 9023 |
Delete a line with sed
2010-08-09 by xpheasBASH-Code:
| sed '42d' in.txt > out.txt |
Deletes line number 42
