Allowing/troubleshooting AirServer through windows 7 firewall

AirServer allows apple mobile devices (Ipads, Iphones) to stream the screen using the airplay protocol.

Unfortunately, AirServer did not work immediately right off the bat on my own machine and required modifying the Advanced firewall settings.

If you see anything appearing even you you have selected Airplay on the device, it may be an issue of the firewall.

In order to test this, disable the firewall for the local network using the instructions here.

On my own computer, I entered the advanced settings of windows firewall and added two inbound rules in order to expose freely the UDP and TCP ports required by AirServer.

Advanced Firewall Settings

Inbound Rule




So, if your having issues using AirServer but do not want to disable the firewall add manual rules for the following ports as described on their site.

AirServer Ports

Using DD for windows to resume a failed file transfer from specific point

If you were transferring a large file and the network cut out you can either restart the copy, or use a tool such as DD for windows to resume from a specific point.
For very large files it is recommended to use better copiers such as robust copy.

I had a file that was 1 421 304 KB in size and I had copied around 60 percent.
Therefore, I needed to start after 852782 KB .

The following command was used:

dd bs=2k if=z:SURCE_FILE of=D:DESTINATION_FILE seek=5767168 skip=426391 --progress

Since skip takes number of blocks defined with size bs= , we skip to 426391.

426391  * 2KB = 852782 KB

Tunneling to VNC over SSH

You may want to connect to a headless/monitorless linux pc with a vnc server running that only exposes an SSH port.

I have used the following steps from windows.

  1. Server:
    Run VNCServer

    If not running already start your server.  You can set the resolution using -geometry tag. This will open a new port/session.

    vncserver -geometry 1920x1200


  2. Workstation:
    Create the tunnel to VNC port
    This maps the local pc port 5905 to localhost:5905 on the remote machine. VNC uses ports 5901 to 5909.

    ssh -L 5905:localhost:5905 -p 22


  3. WorkStation:
    Create tunnel if needed of X-Server

    ssh -L 6005:localhost:6005 -p 22


Bash script to monitor server HTTP output length and e-mail an alert

Below is an example of a script that uses CURL to monitor the length of various HTTP server outputs and output a response if this is different than 103 characters.
This is my first bash script, so I had some reading/experimenting to do and it is quite rough.

Anecdote – forcing wifi bridge to connect to other AP

This is personal anecdote about how to  re-connect to a disconnected wifi bridge if your main AP is off/broken.

Usually our network is layered as follows:

DLINK Powerline Enabled AP
<-----[Copper Power Wire]----->
TP LINK Powerline
ADSL Modem & AP
Asus WL-330N3G 
WD Media Player

So 2 weeks ago the ADSL Modem (AP including LAN DHCP server) died but in the network I continued seeing the SSID. After scanning the network we saw that the ASUS wireless bridge transmits with the same SSID as the ADSL modem / AP. The actual modem is a Belkin but the wireless bridge uses the same SSID as seen below from an iphone app called “Net Analyzer”.

photo 1


Connecting to JMX from visualVM using SSH tunnel

I used the following source:

I did this in windows using git bash that has ssh command. You can also do using cygwin or pure minggw.

1) Run ssh tunnel command in command prompt (I do this in git bash/MINGGW32).

ssh -D 9010 -p 22 root@IP -v

2) Run your application on server with JMX options

java -jar 

3) Run visualVM through socks proxy to connect:

visualvm -J-Dnetbeans.system_socks_proxy=localhost:9010

4) Actually add your JMX remote connection in visualVM

MysqlDump directly on mounted remote directory (CENTOS, Linux, Unix)

If you don’t have space to write a dump file, or want to directly send your SQL to another server (without intermediate transfers), using a remotely mounted folder is a way to go.

There are various mounting options such as:

  • NFS
  • Windows Shares (SAMBA)


Repeating a unix command every X seconds

The watch command can be used to repeat a command every X seconds.


Monitor Disk Usage (updated per second)

watch -n1 df -h

DiskPrint Hello World (every second)

watch -n1 echo “Hello World”


rebit 5 first impressions – synching to network share

Initially I was very happy with the idea of how rebit works. However, now having used it for two days I am dissappointed.

The option to have real-time painless synchronization is quite needed. Personally, I wanted to synch with my NAS at home, and my RAID 6 server at work.

Problems began immediately while trying to configure backup to network shares. The interface is very non-intuitive, but once you figure it out it becomes easy.

The initial backup is VERY slow. In addition to this, I couldn’t ascertain reliably what exactly was going on with my files. At some point the files in the rebit browser backup folder seemed empty.

I can say that my experience up to now has not been efficient nor easy. Instead, simply copying my files using fastcopy finished in 2 hours.

I will give a shot to the rebit 6 trial but I’m glad I didn’t fork over the 40 euros.


Java application not sending e-mail with gmail

Suddenly my java application for sending student attendance reports threw the following exception: unable to find valid certification path to requested target

It turned out that my avast firewall was interfering so I would propose to all those having this problem to disable any anti-viruses or firewalls temporarily and try again.