Notes by voodoo

Displaying keyword search results 1 - 8
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 August 27, 2011 19:17:10    Last update: August 27, 2011 19:17:10
The CPAN module Net::Socket::NonBlock has a port forwarding utility which works for both Unix and Windows: $ perl tcpudppf.pl Usage: tcpudppf.pl <LocalAdd...
Created by voodoo on August 09, 2011 20:21:39    Last update: August 09, 2011 20:21:39
Use the -P switch to scp over an alternate port: $ scp -P 8022 srcFile user@remote_host:/remote/de...
Created by voodoo on November 24, 2010 23:21:00    Last update: March 31, 2011 08:59:05
PostgreSQL jdbc connection string: jdbc:postgresql://<hostname>:<port>/<database_name> . Example code: // register JDBC driver with DriverManager Clas...
Created by voodoo on March 23, 2011 15:32:55    Last update: March 23, 2011 15:36:00
I got "Unknown SSL protocol error" when using curl to get the default page from iis 7 (of course, IE simply displayed "Internet Explorer cannot display the webpage"). The problem was that I used the default iis 7 certificate, which didn't have a name - and that caused SSL to fail. I created a new certificate with a name and that fixed the problem. # curl -v -k --dump-header - https://192.168.80.15... Other possible reasons: 3 Common Causes of Unknown SSL Protocol Errors with cURL
Created by voodoo on July 11, 2009 15:14:55    Last update: July 29, 2010 22:45:48
cURL is a command line tool for transferring files with URL syntax. The main purpose and use for cURL is to automate unattended file transfers or sequences of operations. It's really easy to see HTTP headers with curl: C:\>curl --head http://www.google.com HTTP/1.0 ... or, headers and page together (dump headers to stdout): $ curl --dump-header - http://www.google.com HTTP/... Download openssl from openssl.org: curl http://www.openssl.org/source/openssl-0.9.6m.... C:\>curl --help Usage: curl [options...] <url> ...
Created by voodoo on February 08, 2010 04:57:49    Last update: February 08, 2010 04:57:49
If you don't want to open an extra port for VNC or want extra security with SSH, you can setup an SSH tunnel for VNC. On Windows, you can do this with Putty or openssh . Open a command window, and enter (using Putty as example): C:\local\bin\plink.exe -ssh -2 -L localhost:5901:r... When connecting with vncviewer , use localhost:5901 as server instead of remote_host:5901 . If you use the setup frequently, it is more convenient to setup the tunnel as a Windows service . Assuming the name of the service is vnc_tunnel , the registry entry would look like: Windows Registry Editor Version 5.00 [HKEY_...
Created by voodoo on February 07, 2010 23:33:23    Last update: February 08, 2010 03:04:47
I installed vncserver on my Fedora box and tried to connect to it with vncviewer from Windows XP. I got this error: What could be the problem? These were the steps I took to diagnose it. I just list them here as a reminder. Is Windows firewall blocking the connection? No. It turned out that, unlike ZoneAlarm , the Windows firewall does not block outgoing traffic. It only blocks incoming requests. Is vncserver listening on the right IP address? Yes. netstat showed it's listening on all NICs. netstat -a | grep 5901 tcp 0 0 *:59... Is VNC port open on the local Fedora box on that IP address? Yes, telnet successfully connected: [jim@fedora ~] telnet 172.30.33.9 5901 Trying 1... What does telnet say from...