Kategoriarkiv: Linux

Linux IPTables double NAT, SNAT / DNAT, portforwarding without default gateway

#!/bin/bash # eth1 – inet – 195.184.117.131 # We asume that eth0 is on a private RFC1918 lan on which we are connected to as an ordinary client. # we also asume that eth1 is connected to the internet with … Læs resten

Udgivet i Knowledge Base, Linux, Networking, Old Base | Skriv en kommentar

check if all wordpress installations is updated

This will probably not work, if a non-wordpress webdir contains a directory named ‘wp-includes’. Those webdevelopers were probably smoking pot anyway 🙂 web01:~# find /var/www/virtual -type d -name wp-includes | xargs -n1 -I{} -i bash -c ‘echo {} | cut … Læs resten

Udgivet i Knowledge Base, Linux, Old Base, Wordpress | Skriv en kommentar

ispcp disable mail for a domain

nano /etc/postfix/ispcp/domains comment domain cp /etc/postfix/ispcp/domains /etc/ispcp/postfix/working cd /etc/postfix/ispcp postmap domains !!!!! New and improved version *** It works with the gui: – switch to the user (dom.tld) – delete all mail accounts – switch back to the corresponding reseller … Læs resten

Udgivet i Knowledge Base, Linux, Old Base | Skriv en kommentar

OpenVZ recipies

#tcpsockets (must set both upper mem limit and numsockets) VZID=199 SOCKET_MB=5 NUM_SOCKETS=360 \ SOCKET_BAR=$((1024**2*$SOCKET_MB)) \ SOCKET_LIM=$(($SOCKET_BAR+($NUM_SOCKETS*2560))) ; \ vzctl set $VZID \ –numtcpsock $NUM_SOCKETS \ –tcpsndbuf $SOCKET_BAR:$SOCKET_LIM \ –tcprcvbuf $SOCKET_BAR:$SOCKET_LIM \ –save #othersockets, ie mysql etc. (must set both upper … Læs resten

Udgivet i Knowledge Base, Linux, Old Base | Skriv en kommentar

Decrypt SQL and Mail password from ISPCP

#!/usr/bin/perl # # This is GPL! # # Writen by Mikkel Christensen, Mikjaer Aps # chdir(“/var/www/ispcp/engine”); require ‘/var/www/ispcp/engine/ispcp_common_code.pl’; my ($rs, $real_password); my $pass = $ARGV[0];; ($rs,$real_password) = decrypt_db_password($pass); printf (“%s”,$real_password); exit(0); ~

Udgivet i Knowledge Base, Linux, Old Base | Skriv en kommentar

SSL SMTP operation

% perl -MMIME::Base64 -e ‘print encode_base64(“\000base\@example.net\0001234abcd”)’ AGJhc2VAZXhhbXBsZS5uZXQAMTIzNGFiY2Q= % telnet 1.2.3.4 25 220 smtp.example.net NO UCE ESMTP ehlo testing 250-smtp.example.net NO UCE 250-STARTTLS 250-PIPELINING 250 8BITMIME quit % openssl s_client -starttls smtp -crlf -connect 1.2.3.4:25 220 a.mx.jms1.net NO UCE ESMTP ehlo … Læs resten

Udgivet i Knowledge Base, Linux, Networking, Old Base | Skriv en kommentar

SSL Imap Operation

openssl s_client -connect hostname:993 a login user@example.com password a1 select inbox a1 fetch 1 full a2 fetch 1 body a3 logout

Udgivet i Knowledge Base, Linux, Old Base | Skriv en kommentar

Skift sprog i Debian (Slip af med sprog)

statscollector2:~# df -h Filsystem Størr Brugt Tilb Brug% Monteret pÃ¥ /dev/sda1 227G 704M 215G 1% / tmpfs 506M 0 506M 0% /lib/init/rw udev 10M 80K 10M 1% /dev tmpfs 506M 0 506M 0% /dev/shm Rediger /etc/locale.gen Udkommenter det sprog/locale du … Læs resten

Udgivet i Knowledge Base, Linux, Old Base | Skriv en kommentar

Installing VMware Tools in Debian Etch (4.0)

Second method: (a bit easier than the old one) 1. Install software needed by VMware Tools 1.a. Install packages to build the kernel modules aptitude install autoconf automake binutils cpp gcc linux-headers-$(uname -r) make psmisc 1.b. Find out where the … Læs resten

Udgivet i Knowledge Base, Linux, Old Base | Skriv en kommentar

Se film på en Acer Aspire One Linpus

Denne guide omhandler hvordan man kan komme til og se film på en Acer Aspire One med Linpus på. I indlægget vil jeg kalde computeren AA1, og jeg vil bruge eksterne henvisninger til downloads, så jeg garantere desværre ikke for … Læs resten

Udgivet i Knowledge Base, Linux, Old Base | Skriv en kommentar