In Loki We Trust The many projects of Lokkju, Inc


Accessing Facebook Fan Page Video tagging settings

If you run a fan page, you probably already know you can allow your fans to tag photos you post (and also control if they can post pictures to your page). But did you know you can do the same for Videos? You can, but it is hidden.

Steps to access your video settings:

1) go to your Facebook Page
2) Click the "Edit Info" link near the top of the page
3) Click the "Apps" item on the left hand menu
4) Click "Go To App" under the "Photos" section
5) (this is the trick) - look at your URL bar - you should see a section that says "aid=2305272732". Replace it with "aid=2392950137", hit enter... and now you can manage the ability of your fans to tag and post Videos.


Configuring a Ubuntu 10.04 VPS from scratch

In my last post, I mentioned I recently picked up a cheap VPS. Though the UFW configuration worked, I quickly decided it was overkill for what I wanted to do - I'd rather do my own iptables rules. So, here is a *from scratch* set of commands to configure your new server. It will change your hostname, set up a new (sudo capable user), and set up basic ssh and http firewall rules.

Anywhere you see "[HOSTNAME]" replace it with your hostname.
Anywhere you see "[USERNAME]" replace it with your selected new username.

echo -e "\t[HOSTNAME]" >> /etc/hosts
echo [HOSTNAME] > /etc/hostname
hostname [HOSTNAME]

useradd -d /home/lokkju -U -G sudo -m -s /bin/bash lokkju

passwd [USERNAME]

echo "*filter" > /etc/iptables.rules
echo ":INPUT ACCEPT" >> /etc/iptables.rules
echo ":FORWARD ACCEPT" >> /etc/iptables.rules
echo ":OUTPUT ACCEPT" >> /etc/iptables.rules
echo "-A INPUT -i lo -j ACCEPT" >> /etc/iptables.rules
echo "-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT" >> /etc/iptables.rules 
echo "-A INPUT -i eth0 -p tcp -m tcp --dport 22 -j ACCEPT" >> /etc/iptables.rules
echo "-A INPUT -i eth0 -p tcp -m tcp --dport 80 -j ACCEPT" >> /etc/iptables.rules
echo "-A INPUT -m limit --limit 5/min -j LOG --log-prefix \"iptables denied: \" --log-level 7" >> /etc/iptables.rules
echo "-A INPUT -j DROP" >> /etc/iptables.rules
echo "COMMIT" >> /etc/iptables.rules

iptables-apply /etc/iptables.rules

echo -e "\tpre-up iptables-restore < /etc/iptables.rules" >> /etc/network/interfaces
Filed under: Configuration No Comments

OpenVZ, Ubuntu 10.04, and UFW

I've recently gotten a new VPS ($9/mo, 256MB RAM, 300GB Disk, 10Mbps/unmetered) from FDC Servers. It's running OpenVZ for it's containers, and the first step, as always, is to get the firewall up and running... which can be a pain under OpenVZ.

So, lets do another walkthrough:

  • Install ufw:
    apt-get install ufw
  • Edit /etc/ufw/after.rules
    # don’t log noisy broadcast
    #-A ufw-after-input -m addrtype --dst-type BROADCAST -j ufw-skip-to-policy-input
  • Edit /etc/ufw/ufw/before.rules
    # if LOCAL, RETURN
    #-A ufw-not-local -m addrtype --dst-type LOCAL -j RETURN

    #-A ufw-not-local -m addrtype --dst-type MULTICAST -j RETURN

    #-A ufw-not-local -m addrtype --dst-type BROADCAST -j RETURN

  • “Fix” modprobe
    mv /sbin/modprobe /sbin/modprobe_disabled
    ln -s /bin/true /sbin/modprobe
  • “Fix” sysctl
    mv /sbin/sysctl /sbin/sysctl_disabled
    ln -s /bin/true /sbin/sysctl
  • Fix logging
    apt-get -y purge rsyslog
    apt-get install -y syslog-ng
  • Edit /etc/init/ufw.conf
    start on startup
    #console output
  • Enable ssh & ufw
    ufw allow ssh
    ufw enable

You're Done! now you can safely add more ports for inbound access - but use the port number, not the service name.

Thanks to bodhi.zazen for some of the information above.

Filed under: Configuration 1 Comment