Running GoodSync Server on Ubuntu 13.04/13.10

Over the weekend I wanted to set something up that would sync the files off both my internal and sdcard to my home server. This guide will show you the basics of setting this up. This is not a intuitive guide, but more of “Proof of Concept”, so that you have something to reference while configuring your setup.

  1. Head over to and download the windows version. After downloading and installing goodsync, you will need to register for a goodsync account. Remember your credentials as you will need them later.
  2. Create a directory on your linux box for the goodsync services to sit in. `sudo mkdir /opt/goodsync ; chown your-linux-username:your-linux-group /opt/good`
  3. Now you will need to download the Linux version,
  4. Extract the archive to /opt/goodsync/
  5. As the user you will be running the server as run…. `/opt/goodsync/gs-server /set-admin=”your-goodsync-userid:goodsync-password:your-linux-username”`
  6. As the user you will be running the server as run…. Create a directory called fs in ~/.goodsync/server/ .. `mkdir ~/.goodsync/server/fs` .. Now do a symlink to the  folder structure you want GoodSync Server to have access too. “ln -s target-path ~/.goodsync/server/fs/target-path
  7. Log into the webUI (http://server-ip:11000/) and modify the home path for your user to point to the /home/your-linux-user/.goodsync/server/fs/target-path .. Note .. The login is your goodsync account.
  8. Install app on your Android phone, search the play store for “GoodSync Server”. User your GoodSync username and password. The Third option will be your phone id and you can set it to what ever you want it to be. Just remember it.
  9. Now create the file ~/.goodsync/jobs.tix … `nano ~/.goodsync/jobs.txt` with the following content. Keep in mind that there is no true documentation that I could find so it was basically just guess work to figure this all out on my end. Another thing to note is that home://S0 = Internal SDCard and home://S1 = External SDCard. You will need to modify the following things: your-phone-id, your-goodsync-user, your-goodsync-password, and  fixme(This will need to point to something like: qhome://S0/target-path/Phone_Backup).
    Name = "Phone To Local Job (sdcard0)"
    Dir1 = <Connect> Url = "gstps://your-phone-id.your-goodsync-user.goodsync/home://S0" UserID = "your-goodsync-username" PasswordClear = "your-goodsync-password" </Connect>
    Dir2 = <Connect> Url = "gstps://your-server-id.your-goodsync-user.goodync/fixme" </Connect>
    Direction = 0
    1wayMode = 0
    ReconnectAttempts = 3
    TimerIntervalHours = 2
    SavePreviousVersion = Yes
    CleanupPreviousVersion = Yes
    KeepPreviousVersionDays = 7
    SavePastVersions = Yes
    CleanupPastVersions = Yes
    KeepPastVersionsDays = 14
    ExcludeEmptyFolders = Yes
    AutoResolveConflicts = 3
    FiltersExcluded = <FileMask> Matches = ( "/Android" "name .thumbnails" "*thumb*"  "name subsonic*" "name /cache/" "/*.log"  ) </FileMask>
  10. After you save that file be sure to chmod 600 it so that no other users can read/write the file.
  11. Now lets make it so that gs-server starts with your server/desktop. `sudo wget -O /etc/init.d/gs-server; sudo chmod +x /etc/init.d/gs-server`
  12. Be sure to update /etc/init.d/gs-server variables. USER_ID, GROUP_ID, EXEC_PATH.
  13. Verify that the script is working by running `sudo /etc/init.d/gs-server status`. If it is not running go ahead and test the startup by running `sudo /etc/init.d/gs-server start`. It should be running now and you can verify by checking the logs in ~your-linux-user/.goodsync/server/*.log.
  14. If it is up and running go ahead and run `/opt/goodsync/gsync analyze  /all`. Still no errors? Well then run `/opt/goodsync/gsync sync /all`.
  15. Here is an example of it running successfully.
    2013-12-07 14:31:45: gstps://sch-i535.pryorda.goodsync/home://S0 <-> /lan/Phone_Backup/daniel_s3/s0, SavePastVers, bCleanupPastVers=30d, ResolveConflicts=NewerFileWins
    2013-12-07 14:31:45: Create Folder '/lan/Phone_Backup/daniel_s3/s0/DCIM'
    2013-12-07 14:31:45: Create Folder '/lan/Phone_Backup/daniel_s3/s0/DCIM/Camera'
    2013-12-07 14:31:45: Create Folder '/lan/Phone_Backup/daniel_s3/s0/media'
    2013-12-07 14:31:45: Create Folder '/lan/Phone_Backup/daniel_s3/s0/media/audio'
    2013-12-07 14:31:45: Create Folder '/lan/Phone_Backup/daniel_s3/s0/media/audio/notifications'
    2013-12-07 14:31:45: Create Folder '/lan/Phone_Backup/daniel_s3/s0/Ringtones'
    2013-12-07 14:31:47: Copy New 'gstps://sch-i535.pryorda.goodsync/home://S0/DCIM/Camera/IMG_20131206_211141.jpg' -> '/lan/Phone_Backup/daniel_s3/s0/DCIM/Camera/IMG_20131206_211141.jpg'
    2013-12-07 14:31:47: Copy New 'gstps://sch-i535.pryorda.goodsync/home://S0/media/audio/notifications/facebook_ringtone_pop.m4a' -> '/lan/Phone_Backup/daniel_s3/s0/media/audio/notifications/facebook_ringtone_pop.m4a'
    2013-12-07 14:31:47: Copy New 'gstps://sch-i535.pryorda.goodsync/home://S0/Ringtones/hangouts_message.ogg' -> '/lan/Phone_Backup/daniel_s3/s0/Ringtones/hangouts_message.ogg'
    2013-12-07 14:31:47: Copy New 'gstps://sch-i535.pryorda.goodsync/home://S0/Ringtones/hangouts_video_call.ogg' -> '/lan/Phone_Backup/daniel_s3/s0/Ringtones/hangouts_video_call.ogg'
    2013-12-07 14:31:47: Save State File gstps://sch-i535.pryorda.goodsync/home://S0/_gsdata_/_file_state_v4._gs
    2013-12-07 14:31:47: Items Synced OK: 14, Errors: 0

This guide is a Draft and stands to have some corrections made.  “Use it at your own risk”.  GoodSync documentation sucks right now but is getting better and I’m sorry if it is missing any information. If you have any questions feel free to contact me at

Windows 8.1 and DesktopListView

So today I spent sometime trying to figure out why the original DesktopListView (Google Code) did not work on Windows 8.1 with classicshell installed. It turns out that ClassicShell modifies the pointers, so you have to search for the process handle another way. However, I did get it working by heavily modifying the auto-it script and doing lots of reading on how to find the handle.

There is a x64/x32 but from what I can tell either will work on either. Feel free to mirror, host, and modify it.


Happy Turkey Day.

Setting up iptables logs to go to a different file based on prefix (RSYSLOG)

nano /etc/rsyslog.d/iptables.conf
:msg,contains,”[iptables] ” /var/log/iptables.log

service rsyslog restart
Modify your iptables to look like..
–log-prefix='[iptables] ‘
ex. iptables -A INPUT -s -j LOG –log-prefix='[iptables] ‘

You should be able to sudo tail -f /var/log/iptables.log now and all your iptables logs will be there.

Splunk and pfSense

Splunk Configuration: Setup Files

First, we need to create a couple of files on the Splunk server. If you have not done so already, you can set the $SPLUNK_HOME environment variable with the follwing command “export SPLUNK_HOME=/opt/splunk”, changing the path to fit your installation.


TRANSFORMS-pfsense-firewall = pfsense-firewall
MUST_NOT_BREAK_AFTER = pf: .* rule ([-\d]+\/\d+)\(.*?\):
MUST_BREAK_AFTER = pf: .* (<|>) +(\d+\.\d+\.\d+\.\d+)\.?(\d*)\:
REPORT-pfsense-firewall = pfsense-firewall


REGEX = .* (?<action>pass|block) .* (?<protocol>TCP|UDP|IGMP|ICMP) .* (?<src_ip>(\d+\.\d+\.\d+\.\d+))\.?(?<src_port>(\d*)) [<|>] (?<dest_ip>(\d+\.\d+\.\d+\.\d+))\.?(?<dest_port>(\d*)): (.*)
MV_ADD = 0

Save these two files and chown splunk:splunk $SPLUNK_HOME/etc/system/local/*.conf

Splunk Configuration: Setup UDP Input

The next thing to do is setup the Splunk server to listen on a UDP port to collect the firewall logs from the pfSense router. This is done by navigating in the Splunk web UI to:

  • Manager > Data Inputs > UDP > New

For the UDP port, choose port 514. This is the default UDP port pfSense will send to (this can be changed, but goes beyond the scope of this guide).

Set the sourcetype to Manual and enter pfsense-firewall as the type. Optionally choose Host, Index and Restriction settings and save.

Restart the Splunk server with $SPLUNK_BIN/bin/splunk restart, or from your init script if you have one configured.



Open http, html, and https links in Chrome Incognito

Today I found a really interesting way to make chrome always work in incognito mode.

You can right click and save the following as .reg files then run them with administrator rights. *You need all 4 to open all links in Chrome Incognito Mode*

HTTPS links in incognito mode – Registry fix
HTTP links in incognito mode – Registry fix
FTP links in incognito mode – Registry fix
ChromeHTML last fix for links in incognito mode – Registry fix

After you finish the above you will need to make sure that you change links in the start menu, quick launch, and etc to have –incognito at the end. For Example…..

properties - Chrome Incognito




Resize Ext3 Filesystem

<device> = /dev/your-device ex. /dev/sdb1

Umount the device
umount <device>

Remove journal to make it a ext2 filesystem.
tune2fs -O ^has_journal <device>

e2fsck the disk to make sure there were no issues
e2fsck -f <device>

Remove old partition, create new one. do not write to disk until completely done.
fdisk <device>

Resize the filesystem.
resize2fs <device>

Add the jornal to make it a ext3 filesystem.
tune2fs -j <device>

Remount the filesystem
mount -a

Reset ESXi 5.x Password

  1. Boot to a live cd of some sort. (I used Linux Mint 11 x64-DVD)
  2. once booted open a terminal (ctrl-alt-t)
  3. sudo su –
  4. fdisk -l  (you should be able to see something with /dev/sd*5)
    1. Use gparted if you are using gpt instead of mbr
  5. mkdir /mnt/root_password_recovery && mount /dev/sd*5 /mnt/root_password_recovery
  6. cd /mnt/root_password_recovery
  7. tar xzf state.tgz && tar xzf local.tgz
  8. cd etc/
  9. nano shadow
  10. Delete the root password hash
    1. delete everything in between the first : and the second :
    2. so it should look like root::blah
  11. Tar everything backup
    1. cd /mnt/root_password_recovery
    2. tar czf local.tgz etc
    3. tar czf state.tgz local.tgz
    4. rm -rf local.tgz etc
  12. Reboot and the password should be blank