Notes by voodoo
Displaying keyword search results 1 - 10
Created by voodoo on September 30, 2011 08:22:39
Last update: February 18, 2012 16:17:36
This iptables rule redirects all port 80 traffic from subnet 192.168.0.0/24 to 192.168.0.1 running HTTP proxy (say squid):
/usr/sbin/iptables -t nat -A PREROUTING -s 192.168... Make any packets destined to port 3256 on firewall be NAT'ed to internal system server on port 80: iptables -t nat -I PREROUTING -s ! 192.168.2.0/24 ... To make internal web server work for clients from the internet, LAN and the firewall itself: Make all packets from the Internet going to port 80 on the firewall ( $INET_IP ) to be redirected (or DNAT'ed) to the internal HTTP server ( $HTTP_IP ): iptables -t nat -A PREROUTING --dst $INET_IP -p tc... SNAT the packets entering the firewall that are destined for $HTTP_IP (internal HTTP server) port 80 so that they...
Created by voodoo on February 16, 2012 13:35:38
Last update: February 16, 2012 13:35:57
The C shell allows you to define aliases with arguments: \!^ passes the first argument, \!* passes all arguments. Examples from http://unixhelp.ed.ac.uk :
alias print 'lpr \!^ -Pps5'
alias print 'lp...
In ksh or bash you cannot define alias with arguments. Use function instead.
Created by voodoo on February 13, 2012 20:09:53
Last update: February 13, 2012 20:10:25
This diagram, from The TCP/IP Guide , describes the TCP termination sequence well:
In particular:
The server (the side responding to a CLOSE request, or FIN) enters CLOSE-WAIT to wait for the application using the connection to be told the other end is closing.
The client (the side requesting CLOSE, or initiating the FIN), enters TIME-WAIT to ensure the ACK it sent was received. The waiting period is two times the maximum segment life (2xMSL)
Created by voodoo on February 11, 2012 15:02:56
Last update: February 11, 2012 15:04:13
Screenshot:
Details:
W:Failed to fetch copy:/var/lib/apt/lists/partial/...
Solution:
Become root:
$ sudo bash
Goto the apt folder:
# cd /var/lib/apt
Remove (or move) lists:
# rm -r lists
Create new lists folders:
# mkdir -p lists/partial
Retrieve new lists of packages:
# apt-get update
Created by voodoo on November 18, 2011 14:12:37
Last update: November 18, 2011 14:12:49
Search Ubuntu packages at: http://packages.ubuntu.com/
Created by voodoo on July 14, 2010 23:37:46
Last update: November 16, 2011 12:00:33
Run gpedit.msc
Find Administrative Templates -> Windows Components -> Terminal Services -> Limit Maximum color depth.
Right click on "Limit maximum color depth", click "Properties", then select "Client Compatible".
Update: for Windows 7 the color depth policy was moved to Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Remote Session Environment
Created by voodoo on June 21, 2011 08:19:33
Last update: June 21, 2011 08:34:28
Got "base64: invalid input" error:
$ base64 -d base64_encoded.txt >original.bin
ba...
which can be easily dismissed as "input is invalid base64 encoded" or "partial input". But I know it's valid base64 encoded input!
The problem was, the input was base64 encoded on Windows! The error goes away after converting to Unix format with dos2unix .
dos2unix < base64_encoded.txt | base64 -d >origina...
Version of base64 used:
$ base64 --version
base64 (GNU coreutils) 8.5
...
Created by voodoo on March 24, 2011 09:55:43
Last update: March 24, 2011 10:04:02
Goto http://www.adobe.com/downloads/ , click the download flash player icon
Select YUM for Linux from "Select version to download" dropdown
Save the rpm file, which is about 4.3K.
Install the RPM:
rpm -i adobe-release-i386-1.0-1.noarch.rpm
Import the Adobe key:
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-li...
Install the flash plugin
yum install flash-plugin nspluginwrapper.x86_64 ns...
Created by voodoo on March 03, 2011 21:15:12
Last update: March 03, 2011 21:15:12
I built BartPE on a USB drive but it couldn't see the hard drives. Turned out I needed drivers for the SATA drives on my new PC. These were the steps:
Extract/install the DriverPacks Base program to C:\DPsBase\
Download the latest Mass Storage DriverPack directly to the DriverPacks folder: C:\DPsBase\DriverPacks\
Run C:\DPsBase\DPs_BASE.exe
Detailed instructions: http://driverpacks.net/docs/Miscellaneous%20guides/driverpacks-base-bartpe-guide
Created by voodoo on February 02, 2011 14:28:52
Last update: February 02, 2011 14:30:27
The ProxyRemote directive forwards a request to a remote proxy when itself is acting as a proxy server (forward proxy). For example:
ProxyRemote http://www.somesite.com http://another...
forwards a request for http://www.somesite.com to another proxy server running at another-proxy.local:8080 .
ProxyRemote http http://http-proxy.remote.com
forwards all HTTP requests to the remote proxy http://http-proxy.remote.com .
It must be emphasized that ProxyRemote only functions when:
The Apache server is configured as a forward proxy, i.e., ProxyRequests On .
The user's browser is configured to use the Apache instance as a proxy server.
The second point above clearly differentiates ProxyRemote from ProxyPass , which is the directive to use for reverse proxy.