Here is an easy way to make use of IPv4 GRE tunnels in Ubuntu, or any other Debian based distro. You will need to edit /etc/network/interfaces. Here is a template with the information you will need to add: auto tun1 iface tun1 inet static address <tunnel IP> netmask <tunnel subnet mask> pre-up iptunnel add tun1 mode…
Category: Usefully Found Stuff
GRE between Vyatta Core & pfSense
Below i show the config for Vyatta Core and pfSense configuration details, in order to create a GRE Tunnel between two sites. Vyatta Core Configuration: vyatta@vyatta1-site1:~$ show configuration interfaces { ethernet eth0 { address 192.168.1.1/24 duplex auto hw-id 00:0c:29:00:a3:d7 smp_affinity auto speed auto } ethernet eth1 { address dhcp duplex auto hw-id 00:0c:29:00:a3:e1 smp_affinity auto…
Ubuntu 12.04 Server: Adding Vlan Tagging
Scenario We have a router/firewall with two NICs one used to connect to the Internet (WAN) and the other to connect to the local network (LAN). We would like to beef up the security aspect of our site and introduce a Demilitarized Zone (DMZ). If this should be implemented without the use of vlans we…
Ubuntu 12.04: Adding IP Addresses
Adding additional IP Addresses to Ubuntu 12.04 server x32. nano /etc/network/interfaces Add auto eth0:<PIC AN ID IE eth0:123> iface eth0:<PIC AN ID IE eth0:123> inet static address 192.168.1.52 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.1 dns-nameserver 8.8.8.8 8.8.4.4 dns-search network.local run Service Networking restart then run ifconfig You Should see eth0 Link encap:Ethernet HWaddr…
Simple ZFS Mirrored file system…
Introduction: In this blog post we are going to create a Mirrored file system using ZFS. We are going to use 5 Disks, 4 for data and 1 as a hot spare. The disks will be 200GB with a combined size of 1TB, but acutal usable space will only be 400GB. This file system has…
A WISP, The Basics! (Using Vyatta)….
What Is a WISP? A WISP or Wireless Internet Service Provider, is an Internet Service Provider who uses wireless links to connect your home or office to the internet. Unlike in conventional internet connections using either Cable or ADSL technologies, WISPs attach a antener to the outside of you house pointed at a mast located…
MySQL: How do you set up master-slave replication in MySQL? (CentOS, RHEL, Fedora)…
Before we go into how to set up master-slave replication in MySQL, let us talk about some of the reasons I have set up master-slave replication using MySQL. 1) Offload some of the queries from one server to another and spread the load: One of the biggest advantages to have master-slave set up in MySQL…
Domain Redirection using Apache mod_rewrite and .htaccess
I recently acquired some domains and finally got around to adding them to my server. Instead of them being their own sites (well, point to my primary site, but the URL in the browser address bar is taken over by the new domain name), I wanted them to redirect to my primary domain (phillipcooper.co.uk). If…
m0n0wall 1.34 released
There are ready-made binary images for embedded computers from Soekris Engineering and PC Engines, a CF/IDE HD image for most standard PCs (other embedded ones may work, too) with either keyboard/monitor or serial console, a CD-ROM (ISO) image for standard PCs, a VMware image, as well as a tarball of the root filesystem. Refer to…
Some Simple PHP code..
Below i am going to list some simple PHP code that makes up most of a PHP coded page. If..Elseif…Else… statments $something = “Cat”; if ($something==”Cat”) { print “Cat\n”; } elseif ($something==”Dog”) { print “Dog\n”; } else { print “Dont know\n”; Explode…foreach $ex = “cat:dog:mouse:goose”; $explode = explode(“:”, $ex); foreach ($explode as $exploded) { print…