All posts by satdxsatdx

PI-Hole Add-Blocker on Ubuntu Mini

imageI wanted to utilise the pi-hole software but  didn’t want to use my Raspbury pie, I wanted to use hyper V virtualisation and a basic cut down version of mini Ubuntu, http://archive.ubuntu.com/ubuntu/dists/yakkety/main/installer-amd64/current/images/netboot/mini.iso

so I installed ubuntu from this link above  added the gui and basic gnome and then installed the  the pie hole

after using terminal and this list of commands

sudo apt install git
Sudo git clone –depth 1 https://github.com/pi-hole/pi-hole.git Pi-hole
cd Pi-hole/automated_installer/
bash basic-install.sh

Make the Ubuntu have a static ip

or edit

Sudo nano \etc\dnsmasq.conf

Last 3 lines are IP address and subnet

 

eg 192.168.1.2/24

gateway 192.168.1.254

 

software onto that and then point my DNS via DHCP server to the new Ubuntu to machine

that was it working.

 

Add vnc to xbuntu xbmc

This is so I can control my XBMC downloader PC running xubuntu via my iPad with myVNC.

The discussion here is being limited to XUbuntu 12.04 LTS, however pretty much any version of *nix will work in principle.

Start by ensuring your system is up to date.

sudo aptitude update
my case was sudo apt-get update
sudo aptitude upgrade
my case was sudo apt-get upgrade

Install the server.

sudo aptitude install x11vnc

my case was sudo apt-get install x11vnc

Setup a password file
sudo x11vnc -storepasswd /etc/x11vnc.pass
This command will ask you to provide a password and confirm it.
Once the password file is created, restrict the permissions of the file so only root can access it.

chmod 600 /etc/x11vnc.pass

Automatically start the server
You may want to start the server automatically when ever the computer is running. If you do want this behavior, you will want the server to start even before a user has logged in. In order to accomplish this, place the following code in a file called

/etc/init/x11vnc.conf

start on login-session-start
script
x11vnc -xkb -noxrecord -noxfixes -noxdamge -display :0 -auth /var/run/lightdm/root/:0 -forever -shared -bg -o /var/log/x11vnc.log -rfbauth /etc/x11vnc.pass -rfbport 5901 -localhost

Remove carriage returns if pasting.

start on login-session-start
script
x11vnc -xkb -noxrecord -noxfixes -noxdamge -display :0 -auth /var/run/lightdm/root/:0 -forever -shared -bg -o /var/log/x11vnc.log -rfbauth /etc/x11vnc.pass -rfbport 5901 -localhost
end script

Vnc viewer xbuntu ipaddress:5901

You can manually start x11vnc

SSH into box type

x11vnc -usepw

Vic will be on port 5900

Extracts from this page http://robot.wpi.edu/wiki/index.php/Setting_up_an_XUbuntu_VNC_Serverlink

This is so I can control my XBMC downloader PC via my iPad with myVNC.

Home Irrigation system auto

Two years ago I setup a automatic watering system to water my hanging baskets and pots while I was on holiday for 2weeks,

I have a large water butt that gets filled from the roof of my shed.

I tried a few pumps but best results were from a submerged caravan 12v pump,

20130708-005114.jpg

I added some waste plumbing pipe and a washing up sponge as a filter to the pump,

The was then submerged in the water butt.

I added some 12mm pipe to this and ran it up my garden when near the top of my garden I reduced the pipe to 8mm, then at the top added to a fuel filter from eBay at a cost of £1.58
Then into a fuel anti return valve eBay £6.50, then into this proper irrigation pipe,

20130708-003924.jpg

The pipe was ran to each point with p-clips screwed into the wall and a few cable clips,

I originally was putting screws in the end to make it spray out and to limit the flow, but eventually found these.

20130708-004124.jpg

They work great, the submerged pump is powered from a 12v mains power supply in my kitchen this is switched off and on via a timer digital from Argos at £15 for 3,

20130708-004259.jpg

The cable used was small flex mains cable, I could have maybe gone higher with the voltage as the cable is 20meters and the volts drop may lose a few volts over that distance, but it works ok and has done for 3 years,

I have had to clean the pipes every year but I was using clear pipe for the first 2 years which seems to fill with green algae but now I am using the black pipe don’t expect to suffer any more.

Thought I would share this info as works great or me.

My timer is 7am until 7.30 and 1600 16:30 every day.

20130708-004901.jpg

Hope this info helps someone.

Other useful items:-

20130708-070746.jpg

20130708-070755.jpg

20130708-070800.jpg

20130708-070805.jpg

20130708-070812.jpg

Plex Linux server on my xbuntu

Add Plex server to Ubuntu or in my case Xbuntu from xbmc.org

For Ubuntu installation, add this to your /etc/apt/sources.list file:

deb http://www.plexapp.com/repo lucid main

Then add the repository key:
wget http://plexapp.com/plex_pub_key.pub
sudo apt-key add plex_pub_key.pub
rm plex_pub_key.pub
Then install with the following command:
sudo apt-get update
sudo apt-get install plexmediaserver

Additional information can be found in the Linux PMS forum.

Admin to add content path via web page http://plexserverIP:32400/web/index.html#!/setup

http://plexserverIP:32400/web/index.html

Added the plex app to my iPad works great
Added the plex app as zip to appletv gen1 openelec also work great.
Sony smart tv finds plex in video dlna search but had a issue but does play channels
Further mods needed to get dlna to work on this Linus plex, as a previous install on my windows server worked with dlna perfect.

Great is plex as it adds movie info and DVD covers art.

Can play over Internet with username and password.

Pxe boot to Linux menu then optional wds Linux disks

PXE boot to linux menu WDS

This method works great.

http://thommck.wordpress.com/2011/09/09/deep-dive-combining-windows-deployment-services-pxelinux-for-the-ultimate-network-boot/

Boot to pmagic, repair virus disk, paragon, ghost, more from Pxe

Snip just in case the link above stops working.

PXELinux is part of the SysLinux package

Download SysLinux from here http://www.syslinux.org/wiki/index.php/Download

There’s quite a bit in SysLinux but you only need to extract the following files
ZIP\core\pxelinux.0
ZIP\com32\menu\vesamenu.c32
ZIP\com32\modules\chain.c32
Copy the files into \\WDS\REMINST\Boot\x86
Rename pxelinux.0 to pxelinux.com
You also need to make copies of two original WDS files in this folder
Copy pxeboot.n12 and rename it to pxeboot.0
Copy abortpxe.com and rename it to abortpxe.0
Create to new subfolders
\\WDS\REMINST\Boot\x86\Linux
\\WDS\REMINST\Boot\x86\pxelinux.cfg
The pxelinux.cfgfolder is where you store the files that make up the PXE boot (F12) menu.
All the files we will put in there are text files, even though they don’t use a .txt extension
First create a new text file called default. This is the first menu that loads.
Paste the following text into it

DEFAULT vesamenu.c32
PROMPT 0

MENU TITLE PXE Boot Menu (x86)
MENU INCLUDE pxelinux.cfg/graphics.conf
MENU AUTOBOOT Starting Local System in 8 seconds

# Option 1 – Exit PXE Linux & boot normally
LABEL bootlocal
menu label ^Boot Normally
menu default
localboot 0
timeout 80
TOTALTIMEOUT 9000
# Option 2 – Run WDS
LABEL wds
MENU LABEL ^Windows Deployment Services
KERNEL pxeboot.0
# Option 3 – Exit PXE Linux
LABEL Abort
MENU LABEL E^xit
KERNEL abortpxe.0
Now create a text file called graphics.conf
This file controls how the menu is displayed. It’s very versatile so have a play around until it looks as basic or as flashy as you like
Paste the following text into it

MENU MARGIN 10
MENU ROWS 16
MENU TABMSGROW 21
MENU TIMEOUTROW 26
MENU COLOR BORDER 30;44 #00000000 #00000000 none
MENU COLOR SCROLLBAR 30;44 #00000000 #00000000 none
MENU COLOR TITLE 0 #00269B #00000000 none
MENU COLOR SEL 30;47 #40000000 #20ffffff
MENU BACKGROUND background.jpg
NOESCAPE 0
ALLOWOPTIONS 0
If you want to use a custom background, place it in the \\WDS\REMINST\Boot\x86folder.
The image should be a 640×480 jpeg file.
Make sure it has the same name as specified in the MENU BACKGROUND line in graphics.conf
Now we need to change the default boot program in WDS
Open the Windows Deployment Services Console
Right Click on your Server and select Properties
From the Boot tab change the default boot program for x86 architecture to \Boot\x86\pxelinux.com
In Server 2008 R2 you have to use the wdsutil command line to set the the default boot program with these commands

wdsutil /set-server /bootprogram:boot\x86\pxelinux.com /architecture:x86
wdsutil /set-server /N12bootprogram:boot\x86\pxelinux.com /architecture:x86
Step Three – Test it out

Before you go any further, do a test PXE boot to check everything is OK.

I use a Hyper-V VM to make this testing process quicker. Just make sure it’s set to boot to a legacy network adapter in the settings

PAC file proxy

Working PAC file proxy reason for use iPad WebDAV needs local exclusions.

This pac uses Embc Openhive for all traffic except https but then uses https just for Openhive.
Also excludes local traffic from proxy eg WebDAV or local web intranet traffic
Modify host name , change 10.2.*.* to your local ip range proxy if not on Openhive.
Call file proxy.pac or .dat if using local web server remember to add mime type:-
application/x-ns-proxy-autoconfig (as found here http://marckean.wordpress.com/2010/02/09/setting-up-proxy-pac-files-in-iis7-for-proxy-use/)

Proxy.pac file name

Quick test save to c:\proxy.pac point auto section of proxy to :/

file://c:\proxy.pac
So
Copy below to notepad and save as proxy.pac

function FindProxyForURL(url, host) {
//check for local domains
if (dnsDomainIs(host,”localserver-srv01.domain.local”)) {return “DIRECT”;}
//check for local IP addresses
if ((shExpMatch(host,”127.0.0.1″))
|| (shExpMatch(host,”10.2.*.*”)) // Enter you local IP subnets
) {return “DIRECT”;}
//check for short host names
if (isPlainHostName(host)) {return “DIRECT”;}
if (shExpMatch(url, “https://leicester.inthehive.net*”)) {return “PROXY webshield.embc.uk.com:80”;}
if (url.substring(0, 6) == “https:”) {return “DIRECT”;}

//else return proxy
return “PROXY webshield.embc.uk.com:80”;
}

Schools home pages and business home pages

Because of the time it takes to get a class onto the page when teaching I created a school homepage for primary schools.
Teacher tell me the links they want and I add it to their custom page.

http://www.mts-it.com/01schhome/index.htm

This page then developed into custom pages for some schools

http://www.mts-it.com/01schhome/parklands.htm

Then I did the same for some businesses

http://www.mts-it.com/01schhome/europrojects.htm

This was made using dreamweaver and a CSS background tile, each picture is captured and tailored with snagit 300 x 100 then inserted into a table with 3 across and lots down the page,
A meta script refreshed the page every 30 seconds, this helps when changes are made.

I have also created a few support useful links

http://www.mts-it.com/01schhome/support.htm
http://www.mts-it.com/01schhome/satdx.htm
http://www.mts-it.com/01schhome/tools.htm

Hope you find this useful.

20130630-093645.jpg