There are seemingly infinite possibilities when it comes to configuring WireGuard as a “VPN Server”. Specifically, allowing a remote peer to access the intranet on the “server” end can be accomplished in a variety of ways. In this discussion we’ll assume that the WireGuard Server is running on Ubuntu Server 22.04. Continue reading
Tag Archives: Ubuntu
Ubuntu Server 10.04 on Hyper-V
See this TechNet article for enabling Hyper-V modules and networking in Ubuntu:
http://social.technet.microsoft.com/wiki/contents/articles/961.aspx
To fix the sluggish command console, disable the frame buffer module. Edit /etc/modprobe.d/blacklist-framebuffer.conf and add the following line:
blacklist vga16fb
Ubuntu Server 10.04 Fix Reboot Hang
nano /etc/default/grub
add “reboot=bios” to the “GRUB_CMDLINE_LINUX_DEFAULT=” line
Ubuntu 10.04.2 Live USB
Created USB using Universal-USB-Installer-1.8.3.7.exe and ubuntu-10.04.2-desktop-i386.iso.
Edited /syslinux/text.cfg on USB as follows:
default live
label live
menu label ^Run Ubuntu from this USB
kernel /casper/vmlinuz
append noprompt cdrom-detect/try-usb=true persistent file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz splash --
label live-nvidia
menu label Run Ubuntu (NVidia)
kernel /casper/vmlinuz
append noprompt cdrom-detect/try-usb=true persistent file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz nomodeset --
label live-vesa
menu label Run Ubuntu (VESA)
kernel /casper/vmlinuz
append noprompt cdrom-detect/try-usb=true persistent file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz xforcevesa --
label live-install
menu label ^Install Ubuntu on a Hard Disk
kernel /casper/vmlinuz
append cdrom-detect/try-usb=true file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity initrd=/casper/initrd.lz splash --
label memtest
menu label Test ^memory
kernel /install/mt86plus
label hd
menu label ^Boot from first hard disk
localboot 0x80
Enable External Mail on Ubuntu
First, install the appropriate packages:
sudo apt-get install mailutils
Configure Exim for external mail:
sudo dpkg-reconfigure exim4-config
Options:
- mail sent by smarthost; no local mail
- FQDN of the system
- 127.0.0.1 (This will prevent external use of the server to send mail.)
- localhost; hostname
- FQDN of the system
- External (ISP) SMTP server
- Dial-on-Demand? No
- Split config? No
- Root/postmaster recipient: (enter the email address you wish to receive messages sent to root/postmaster on the system).
The root/postmaster recipient is stored in /etc/aliases
The Exim configuration is stored in /etc/exim4/update-exim4.conf.conf. To apply configuration manually changed in this file, run:
sudo update-exim4.conf sudo /etc/init.d/exim4 restart
Actual Exim configuration is stored in /var/lib/exim4/config.autogenerated. Don’t edit this file directly.
This was tested on Ubuntu 10.04 (Lucid)
Launch Nautilus in Ubuntu with gksu
gksu "dbus-launch nautilus --no-desktop --browser /"
Subversion Installation with Submin, WebDAV, & WebSVN
Installation of Subversion with:
- Submin for administering subversion users and repositories
- WebDAV for access to repositories
- WebSVN for browser access to repositories
Subversion Installation:
aptitude install subversion
Submin Installation:
Add the following repository to /etc/apt/sources.list:
# Submin Repository deb http://debian.supermind.nl/ current main
Install key for submin repository:
wget -q -O - http://supermind.nl/debian.key | apt-key add -
Update Package List and Install Submin:
aptitude update aptitude install submin
Create Folder Structure and Files:
mkdir /var/svn mkdir /var/svn/conf mkdir /var/svn/repos
touch /var/svn/conf/authz touch /var/svn/conf/htpasswd touch /var/svn/conf/submin.conf touch /var/svn/conf/userproperties.conf touch /var/svn/conf/apache-svn.alias
Add Submin Admin User
htpasswd -m /var/svn/conf/htpasswd administrator
Configuration File Contents:
# /var/svn/conf/authz [groups] submin-admins = administrator
#/var/svn/conf/submin.conf [svn] authz_file = /var/svn/conf/authz userprop_file = /var/svn/conf/userproperties.conf access_file = /var/svn/conf/htpasswd repositories = /var/svn/repos [www] base_url = /submin svn_base_url = /svn trac_base_url = [backend] bindir = /usr/share/submin/bin [generated] session_salt = d7xOuU8hY9cF1qB/u/
# /var/svn/conf/apache-svn.conf
# Default Apache Submin Configuration
Alias /submin /usr/share/submin/www
<Directory /usr/share/submin/www>
Options ExecCGI FollowSymLinks
AddHandler cgi-script py cgi pl
SetEnv SUBMIN_CONF /var/svn/conf/submin.conf
RewriteEngine on
RewriteBase /submin
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)$ submin.cgi/$1
RewriteRule ^/?$ submin.cgi/
Order Allow,Deny
Allow from all
</Directory>
# WebDAV Configuration
<Location /svn>
DAV svn
SVNParentPath /var/svn/repos
AuthzSVNAccessFile /var/svn/conf/authz
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /var/svn/conf/htpasswd
Require valid-user
Order Allow,Deny
Allow from all
Satisfy Any
</Location>
# WebSVN Configuration
Alias /websvn "/var/svn/websvn/"
<Directory "/var/svn/websvn/">
Options -Indexes -FollowSymLinks
AllowOverride None
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /var/svn/conf/htpasswd
Require valid-user
Order Allow,Deny
Allow from all
Satisfy All
</Directory>
# Disallow web access to directories that don't need it
<Directory "/var/svn/websvn/include">
Order Deny,Allow
Deny from All
</Directory>
WebSVN Installation
- Download WebSVN from http://www.websvn.info/download/.
- Extract the contents of the archive to
/var/svn/ and rename the folder from 'websvn-?.?.?' to just 'websvn‘.
cd /var/svn wget http://websvn.tigris.org/files/documents/1380/47525/websvn-2.3.1.tar.gz tar -xvzf websvn-2.3.1.tar.gz mv websvn-2.3.1 websvn
- Configure WebSVN with the following file:
<?php
// # /var/svn/websvn/include/config.php
$config->setSvnConfigDir('/etc/subversion');
$config->parentPath('/var/svn/repos');
$config->addTemplatePath($locwebsvnreal.'/templates/calm/');
$config->addTemplatePath($locwebsvnreal.'/templates/BlueGrey/');
$config->addTemplatePath($locwebsvnreal.'/templates/Elegant/');
$config->useAuthenticationFile('/var/svn/conf/authz'); // Global access file
$config->addInlineMimeType('text/plain');
$config->setMinDownloadLevel(2);
$config->useGeshi();
set_time_limit(0);
$config->expandTabsBy(8);
Configure Permissions:
chown -R root:www-data /var/svn chmod -R ug=rwX,o= /var/svn/conf chmod g-w /var/svn/conf/apache-svn.conf chmod -R ug=rwX,o= /var/svn/repos chmod -R 750 /var/svn/websvn
Configure Apache:
- Enable Apache Mod Rewrite
ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load
- Include the required apache configuration by adding a symlink to the apache conf.d directory
ln -s /var/svn/conf/apache-svn.conf /etc/apache2/conf.d/apache-svn.conf
- Restart Apache Server
/etc/init.d/apache2 restart
SVN on Ubuntu
Repository Location: /var/lib/submin/svn
/etc/apache2/sites-available/fender-svn.alias
# /submin and /svn from /etc/submin/default-apache-cgi.conf
Alias /submin /usr/share/submin/www
<Directory /usr/share/submin/www>
Options ExecCGI FollowSymLinks
AddHandler cgi-script py cgi pl
SetEnv SUBMIN_CONF /etc/submin/default.conf
RewriteEngine on
RewriteBase /submin
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)$ submin.cgi/$1
RewriteRule ^/?$ submin.cgi/
Order Allow,Deny
Allow from all
</Directory>
<Location /svn>
DAV svn
SVNParentPath /var/lib/submin/svn
AuthzSVNAccessFile /var/lib/submin/authz
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /var/lib/submin/htpasswd
Require valid-user
Order Allow,Deny
Allow from all
Satisfy Any
</Location>
Alias /websvn "/var/www/websvn/"
<Directory "/var/www/websvn/">
Options -Indexes -FollowSymLinks
AllowOverride None
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /var/lib/submin/htpasswd
Require valid-user
Order Allow,Deny
Allow from all
Satisfy All
</Directory>
Reinstall Ubuntu Grub Bootloader After Windows Wipes it Out
If you run a dual-boot system with Linux and Windows, this has happened to you. You had to do your monthly reinstall of Windows, and now you don’t see the linux bootloader anymore, so you can’t boot into Ubuntu or whatever flavor of linux you prefer.
Here’s the quick and easy way to re-enable Grub.
1) Boot off the LiveCD
2) Open a Terminal and type in the following commands, noting that the first command will put you into the grub “prompt”, and the next 3 commands will be executed there. Also note that hd0,0 implies the first hard drive and the first partition on that drive, which is where you probably installed grub to during installation. If not, then adjust accordingly.
sudo grub
> root (hd0,0)
> setup (hd0)
> exit
Reboot (removing the livecd), and your boot menu should be back.
Only read below if Windows is now missing from the boot menu
If you installed Ubuntu before you installed Windows, then Ubuntu will not have anything in the grub configuration for Windows. This is where you’ll have to do a bit of manual editing to the grub boot menu file.
If you open the file /boot/grub/menu.lst with the following command:
sudo gedit /boot/grub/menu.lst
You’ll see a sample section for Windows, which you’ll want to uncomment and add to the boot menu list in whatever position you want it in. (uncomment by removing the #’s)
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
Note that you should also verify that hd0,0 is the correct location for Windows. If you had installed Windows on the 4th partition on the drive, then you should change it to (hd0,3)