Proxmox IP bridge for single public IP

  I just setup a test copy of proxmox 4.1 and realized I only had one IP attached to the box. So I had to set up a bridge and forward ports to the internal IPs. So the basic idea is, we are going to set up a new virtual interface bridge in your networking file. This requires a working proxmox machine up and running. I am using a standard install, no changes made to the network prior to this. Proxmox Desired Network Layout External IP ————————- proxmox server as NAT ————————— Internal IP ————————- NAT ————————-   Current network Layout when we check /etc/network/interfaces we see the following : # The loopback network interface auto lo iface lo inet loopback # for Routing auto vmbr1 iface vmbr1 inet manual post-up /etc/pve/ bridge_ports dummy0 bridge_stp off bridge_fd 0 # vmbr0: Bridging. Make sure to use only MAC adresses that were assigned to you. auto vmbr0 iface vmbr0 inet static address netmask network broadcast gateway bridge_ports eth0 bridge_stp off bridge_fd 0 iface vmbr0 inet6 static address 1:2:3:4::5 netmask 64 post-up /sbin/ip -f inet6 route add 1:2:3:4:ff:ff:ff:ff dev vmbr0 post-up /sbin/ip -f inet6 route add default via 1:2:3:4:ff:ff:ff:ff pre-down /sbin/ip -f inet6 route del default via 1:2:3:4:ff:ff:ff:ff pre-down /sbin/ip -f inet6 route del 1:2:3:4:ff:ff:ff:ff dev vmbr0 As you can see above we have a working interfaces file just with pseudo IPs instead of real ones. yours will of course have your own IP. Also, you may not have an […]

linux shell argument list too long rsync or cp

I needed to copy files generated by doxygen from one directory into another for a large opensource C++ project. Sadly there were too many files in the directory, so bash started complaining 🙁 cp and rsync died out with the error of argument list too long. initially I figured I could generate it all from scratch in new location but it was quicker and easier to use a for loop to rsync the files over 🙂 some info: all files start with alphabetic characters. there are no spaces in the names all files are in single directory I realized bash expansion would work here. Using for loop for x in {a..b} do echo $x* done Notice I only stepped between A and B because I didn’t want to sit there for an hour while it listed all the files. this worked well, it listed all files and I was sure it would suite my purposes. now the real deal! for x in {a..z} do echo $x rsync -az /backups/doxygen/$x* /home/user/current/directory/ done sometimes you might still get the error even for each letter, for example I still had too many files starting with D and Q. so I just changed where I globbed : for x in {a..z} do echo $x rsync -az /backups/doxygen/d$x* /home/user/current/directory/ done this allows me to further iterate a thru z but after starting the files with the letter d. Now what happens if you happen to have files starting with numbers? simply switch the letters for numbers. for x in {0..9} […]

Android Root Pros and Cons

We have all heard of rooting our android phones and how awesome it may be. Our own in house writer Anna has written an article about this previously. The procedure is simple enough, but is it worth doing? well I have some pros and cons of rooting listed below. The list is by no means complete, and will never be with all the new apps being released and procedures being found every day. so without further ado: Android Root Pros Customization You can customize your phone from themes to default applications. You can change launchers, phone calling app, contacts app etc at a whim. De-Bloat Phone carriers love to include bloatware and crapware with their phones. Rooting allows you to freeze or uninstall these applications so your phone runs better, faster and has better battery life. Backups You can backup individual apps, or entire partitions once you’re rooted so you can experiment with your phone or if you change phones you have a full backup. Custom 3rd party roms You can install custom roms to enjoy lower overhead, no tracking apps like carrierIQ or plain and simple more updated versions of android. Performance Ever hear of overclocking? which is basically making your phone go faster by allowing more voltage to go to the CPU or setting the control algorithms called governor to a different one that processes applications differently. rooting allows you to overclock, undervolt etc at whim. Apps Many carriers block certain apps because .. well mostly because of bullshit rules. Rooting allows you to install and enjoy any such apps. […]

[How To’s] Android M Preview 2 for Nexus Devices

Google I/O 2015 has come and gone, and it brought many cool bits of news for us. One of the ones that caught my fancy was the Android M preview releases. I happen to have an Android Nexus 5 device handy and wanted to try M preview 2 which was recently released. If you don’t mind having your data wiped (possible to avoid at your own risk) you too can join the ranks of Android M users, who number in the many DOZENS!     !!! Warning, everything mentioned here is experimental; perform any steps here on your own conscience. Android Bakers, Google, XDA, and Abakers staff are not responsible for any issues you may run into or your phone dying/bricking/planking or your dog running off with your prized possessions. !!! First and foremost here are the prereqs : Get a copy of ADB and FASTBOOT if you dont have them already. Download a copy of the Android M preview 2. Nexus 5 Nexus 6 Nexus 9 Enable USB debugging on your phone / tablet. Installing the Android M Preview connect your phone to your computer and make sure USB debugging is enabled from developer menu in settings. hopefully you installed ADB and fastboot systemwide. extract the archive you downloaded above for your device. move to the extracted folder open a terminal in the folder Linux: open a terminal and cd to wherever you extracted the files. Windows: make sure no icons are selected, hold down shift and right click in the window, click on open command […]

Debian package management speed ups

No one likes to sit around waiting for slow mirrors while updating multiple packages but its a fact of life usually. In debian it means typing apt-get update and sitting around for a while, then doing the actual install or upgrade and getting some coffee. what if you could speed the process along somewhat? well now just like we showed you how to speed up apt downloads for ubuntu you can speed up the apt speeds for Debian! This way you can focus more on clashing some clans or something…. whatever you do in your free time that is. Httpredir In comes httpredir, “It uses the geographic and network location of the user and the mirrors, the architecture of the requested files, IP address family, the availability and freshness of the mirrors, and a few other things” to find the closest and fastest mirror of data for you. This gives you the quickest way to get your files without resorting to new tools or alternate package managers. This is already there for Jessie ( debian 8 ) so no need to edit that, but for everyone else on older releases this will bring wonderful speedups. setting up httpredir is simple : edit your /etc/apt/soucres.list deb sid main deb-src sid main replace with deb sid main deb-src sid main

WordPress file access denied on update or plugin install

Ever try to update wordpress or a plugin or install a theme or plugin and get this error : “To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.” It’s basically a file access denied type of error. Well I don’t want to put my ftp info in the config file, mainly because I was too smart for my own good and picked some 21 char long ftp pass that I can’t find right now. However my SSH access via my ssh key is still good to go 🙂 You can switch the filesystem method to direct instead of ftpsockets to make this easier for yourself. i.e. add the following to your wp-config.php : define( ‘FS_METHOD’, ‘direct’ ); now retry the upgrade. voilĂ ! More info