<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://www.blissend.com/forums/extern.php?action=feed&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Forums]]></title>
		<link>http://www.blissend.com/forums/index.php</link>
		<description><![CDATA[The most recent topics at Forums.]]></description>
		<lastBuildDate>Sun, 08 Jan 2012 23:55:39 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[SOPA and Domain Migration]]></title>
			<link>http://www.blissend.com/forums/viewtopic.php?id=23&amp;action=new</link>
			<description><![CDATA[<p>I have officially migrated all the domains I own including the gaming community I manage away from GoDaddy whom supports SOPA. Although they stated they took back their support of it, it was found later that wasn&#039;t really true. Henceforth I&#039;m now with namecheap.com whom openly apposes SOPA.</p><p>For those that do not know what SOPA is, know that its a very draconian act that gives too much power against websites into the wrong hands. Google for more information and google information about NDAA too Obama has just signed into law.</p>]]></description>
			<author><![CDATA[dummy@example.com (blissend)]]></author>
			<pubDate>Sun, 08 Jan 2012 23:55:39 +0000</pubDate>
			<guid>http://www.blissend.com/forums/viewtopic.php?id=23&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[BoO]]></title>
			<link>http://www.blissend.com/forums/viewtopic.php?id=22&amp;action=new</link>
			<description><![CDATA[<p>Belt of Orion (BoO) is an opensource (GPL License) text based scrolling RPG (in a live environment, not turned based) designed to support the freedom of making your own game world/stories. It is written in python/wxpython and utilizes an sqlite database backend. Because of this, it is crossplatform and will be able to support Windows/OSX/Linux operating systems.</p><p>Note that the wiki link below is meant for new players, developers, etc. trying to understand the game and how it works. Please explore it for more information. Also note that the game is currently an alpha build with no set timeline on completion or whats all to be included in the game. When it is released, there will be a better introduction.</p><p>This game relies heavily on the database. From there you can control most things which allows you to create your own world. As such, in a lot of the wiki articles, there will be tables explaining the database schema. You can use SQLiteStudio to edit the database which is an opensource portable database editor. <a href="http://sqlitestudio.one.pl">http://sqlitestudio.one.pl</a></p><p>If you would like to contribute, then donations are always welcomed <a href="http://www.blissend.com/donate">www.blissend.com/donate</a> or you can help me add content to the game. For now, the only content I need is items (weapons/armor/clothing/misc.), races, appearance descriptors, and help mapping the world. Please check the wiki link below before you try adding anything into the database and check back regularly for updates. Failure to do so may result in submitted content not being used.</p><p>Wiki: <a href="http://www.blissend.com/files/boowiki.html">http://www.blissend.com/files/boowiki.html</a> (FYI, this is downloadable)<br />Alpha Build: <a href="http://www.blissend.com/files/boo.zip">http://www.blissend.com/files/boo.zip</a> (~9MB)<br />Database Editor: <a href="http://sqlitestudio.one.pl">http://sqlitestudio.one.pl</a></p><p>Alpha Screenshot...<br /><span class="postimg"><img src="http://www.blissend.com/files/boo_alpha.png" alt="boo_alpha.png" /></span></p>]]></description>
			<author><![CDATA[dummy@example.com (blissend)]]></author>
			<pubDate>Thu, 29 Sep 2011 19:46:38 +0000</pubDate>
			<guid>http://www.blissend.com/forums/viewtopic.php?id=22&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[dWAN Server]]></title>
			<link>http://www.blissend.com/forums/viewtopic.php?id=21&amp;action=new</link>
			<description><![CDATA[<p>This is something I started at work but decided to license it under GPL. It takes a CentOS 5.1-5 server with three eth ports and sets it up to be a dual WAN router.</p><p>Features...<br /></p><ul><li><p><strong>DHCP through dnsmasq</strong></p></li></ul><div class="quotebox"><blockquote><div><p>I use dnsmasq for the internal network setup. It works great for small offices.</p></div></blockquote></div><ul><li><p><strong>QoS for each ISP</strong></p></li></ul><div class="quotebox"><blockquote><div><p>You can define uplink speed based on priorities or just set a global speed cap. Setting a speed cap will fix an asynchronous line issue where maxing the upload speed cripples download speed. For offices someone maxing the bandwidth limit is really bad so its a must have to fix connection issues. This is an optional feature and can be disabled (disabled by default).</p></div></blockquote></div><ul><li><p><strong>Load Balancing</strong></p></li></ul><div class="quotebox"><blockquote><div><p>By default it&#039;s setup to do priority routing so that one ISP is used for general traffic and the other ISP is used only for traffic you want to go on it. This is great for work because that means nobody doing nonbusiness related activities can hinder the other ISP doing important work. You simply configure which IP addresses are important and it&#039;ll go across the one ISP.</p></div></blockquote></div><ul><li><p><strong>Failover Detection</strong></p></li></ul><div class="quotebox"><blockquote><div><p>This will detect if the link is unplugged, line instabilities, or failing all ping tests. If so, traffic will be rerouted to the working ISP. It can even be configured to keep trying to bring the bad line back online and email you alerts whenever a failover switch happens. Again this great for offices which require higher uptime. This can also be monitored live through a screen session as well as a log file it creates when a failover switch happens.</p></div></blockquote></div><ul><li><p><strong>One config file</strong></p></li></ul><div class="quotebox"><blockquote><div><p>For the most part, all you have to do is configure one file. There are many options you can configure to fine tune how failover detection works amongst other things.</p></div></blockquote></div><p>There are instructions (.doc file) included on how to install/setup everything. Download <strong><a href="http://www.blissend.com/files/dualwan.zip">dWAN Server</a></strong> (.zip ~56KB)</p>]]></description>
			<author><![CDATA[dummy@example.com (blissend)]]></author>
			<pubDate>Thu, 29 Sep 2011 19:24:42 +0000</pubDate>
			<guid>http://www.blissend.com/forums/viewtopic.php?id=21&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[News Generator]]></title>
			<link>http://www.blissend.com/forums/viewtopic.php?id=20&amp;action=new</link>
			<description><![CDATA[<p><span class="postimg"><img src="http://www.blissend.com/files/newsgenerator.png" alt="newsgenerator.png" /></span></p><p>This plugin was originally made by Rickard Andersson for PunBB back in the day but I have adapted and expanded upon it with the help of FluxBB devs.</p><p>The purpose of this plugin is to generate static markup based on a template for those posts you deem as news (creates news.html). This can be used for example to display the home page of your site.</p><p>NOTE: Not really a mod, more like a plugin since its drag/drop install (readme.txt inside).</p><p><strong>Options...</strong></p><ul><li><p><strong>Fetch news from forum</strong><br />The forum you want to grab posts from. Simply hovering the mouse over the forum link should display the forum ID (e.g. <a href="http://fluxbb.org/forums/viewforum.php?id=1">http://fluxbb.org/forums/viewforum.php?id=1</a>). By default it goes for forum 1.</p></li><li><p><strong>Optional: Max Post Length</strong> <span style="color: #00FF00"><em>(new)</em></span><br />This will crop the post to what you define as the character limit. It won&#039;t cut the base forum tags and if it opens one up it&#039;ll try to close the tag. Also it&#039;ll display a read more link to the rest of the post.</p></li><li><p><strong>Number of posts for latest</strong><br />The maximum number of posts to grab for the news.html it generates. So if you set 5, it&#039;ll grab the 5 latest topic post from the forum ID chosen.</p></li><li><p><strong>Using news template</strong><br />The template used for the generated news.html file and archives. TIP: You can edit news.tpl and save it as about.tpl and using this as the news template will generate an about.html instead.</p></li><li><p><strong>Saving latest news to</strong><br />Where to save the generated news.html file. The directory should be writable and if not it should let you know.</p></li><li><p><strong>Optional: Topic ID</strong> <span style="color: #00FF00"><em>(new)</em></span><br />If you only want to generate the news for one in particular then you can specify its topic ID (again you can discover this by looking at the link to the topic). The <strong>number of posts</strong> option above must be set to 1 for this.<br /></p></li><li><p><del><strong>Generate news and/or archive?</strong> <span style="color: #00FF00"><em>(new)</em></span><br />You have a choice to generate only news or archives or both. One must be selected.</del></p></li><li><p><del><strong>Using archive index template</strong><br />The template used to generate the links to all the archives.</del><br /></p></li><li><p><del><strong>Saving archive to</strong><br />The directory to save all the archives (2010-09.html, 2010-08.html, etc.). This directory should be writable.</del><br /></p></li><li><p><del><strong>Optional: Earliest year &amp; month</strong>, <strong>Optional: Latest year &amp; month</strong> <span style="color: #00FF00"><em>(new)</em></span><br />For large boards it can take a long time to generate the archives and run into problems with script execution time limit. To get around this you can manually do the archives in small batches or perhaps you only want a small portion to be archived in the first place <img src="http://www.blissend.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /></del></p></li></ul><p>Download <strong><a href="http://fluxbb.org/resources/mods/news-generator/">newsgenerator_v1.1.3.zip</a></strong><br />Mirror <strong><a href="http://www.blissend.com/files/newsgenerator_v1.1.1.zip">newsgenerator_v1.1.3.zip</a></strong></p>]]></description>
			<author><![CDATA[dummy@example.com (blissend)]]></author>
			<pubDate>Thu, 29 Sep 2011 19:24:12 +0000</pubDate>
			<guid>http://www.blissend.com/forums/viewtopic.php?id=20&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[Spam IP Check]]></title>
			<link>http://www.blissend.com/forums/viewtopic.php?id=19&amp;action=new</link>
			<description><![CDATA[<p>This is yet another method to stop forum spam registrations. The way it works is to check the user&#039;s IP registering against DNSBL lists online that include stopforumspam.com and spamhaus.org or any others you may want to add yourself.</p><p>For those who don&#039;t know, stopforumspam.com is shared on <a href="http://dnsbl.tornevall.org">http://dnsbl.tornevall.org</a>/ according to their <a href="http://www.stopforumspam.com/apis">API usage page</a>. This allows you to do searches without an API key. Note that you can find more DNSBL lists over at <a href="http://www.dnsbl.info/dnsbl-list.php">http://www.dnsbl.info/dnsbl-list.php</a></p><p>Now, if it finds the user&#039;s IP registering in any list it&#039;ll deny registration. While it&#039;ll prevent the same IP from being checked again within the hour, please be careful though. Each list likely has a limit on the number of IP lookups you can do per day or month hence the global limit option provided.</p><p>EDIT: My original simplistic version is available <a href="https://fluxbb.org/forums/viewtopic.php?pid=40838#p40838">here</a> thanks to trichome for saving what I lost! For more advanced options check the download links below.</p><p>Download <a href="http://fluxbb.org/resources/mods/spam-ip-check/">spamipcheck.zip</a><br />Mirror <a href="http://www.blissend.com/files/spamipcheck.zip">spamipcheck.zip</a></p><p>Options Screenshot...<br /><span class="postimg"><img src="http://www.blissend.com/files/spamipcheck.png" alt="spamipcheck.png" /></span></p>]]></description>
			<author><![CDATA[dummy@example.com (blissend)]]></author>
			<pubDate>Thu, 29 Sep 2011 19:23:10 +0000</pubDate>
			<guid>http://www.blissend.com/forums/viewtopic.php?id=19&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[Spam IP Check]]></title>
			<link>http://www.blissend.com/forums/viewtopic.php?id=16&amp;action=new</link>
			<description><![CDATA[<p>I have released a new mod for fluxbb forums that will check guest&#039;s IP addresses against DNSBL online if they are attempting to register on your forums. If any match is found, it&#039;ll deny registration which becomes an effective way to stop spam accounts from being created.</p><p>I made this out of frustration that image captcha&#039;s, question &amp; answer forms, etc. never seeming to stop enough of those spam accounts from being created. This caused me to have to manually approve each account until I discovered a PHP checkdnsrr function that can be used to check against DNS Black Lists online. To my surprise, in my testing most of those spam accounts were indeed listed in one list or another. So the creation of this modification began.</p><p>The first release is shown in my projects page and will soon be ported to other web services if not already (i.e. ip.boards, wordpress, etc.).</p>]]></description>
			<author><![CDATA[dummy@example.com (blissend)]]></author>
			<pubDate>Thu, 05 May 2011 15:21:56 +0000</pubDate>
			<guid>http://www.blissend.com/forums/viewtopic.php?id=16&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[This statement is false.]]></title>
			<link>http://www.blissend.com/forums/viewtopic.php?id=13&amp;action=new</link>
			<description><![CDATA[<div class="quotebox"><cite>pach wrote:</cite><blockquote><div><p>ohi bliss i found this place. so this is where you&#039;ve been all this time.</p></div></blockquote></div><p>Yup 8) I always have this site for goofing around. Also since I just released my own mod to fight spam (yesterday in fact) I will stop this requirement stated in this thread since there is no need of it w00t!</p>]]></description>
			<author><![CDATA[dummy@example.com (blissend)]]></author>
			<pubDate>Wed, 04 May 2011 22:18:06 +0000</pubDate>
			<guid>http://www.blissend.com/forums/viewtopic.php?id=13&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[Forums]]></title>
			<link>http://www.blissend.com/forums/viewtopic.php?id=15&amp;action=new</link>
			<description><![CDATA[<p><span class="bbs">I&#039;ve disabled forum signups due to bots. They&#039;re everywhere man. Anyway, if you&#039;re a friend of mine and would like an account just send me email. Sorry for any inconvenience.</span></p><p><strong>UPDATE:</strong> I think I found an efficient way to deal with the forum spam registrations and will be experimenting with it here. For now I&#039;ve enabled signing up again.</p>]]></description>
			<author><![CDATA[dummy@example.com (blissend)]]></author>
			<pubDate>Tue, 26 Apr 2011 18:23:55 +0000</pubDate>
			<guid>http://www.blissend.com/forums/viewtopic.php?id=15&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[Securing SSH (without key pairs)]]></title>
			<link>http://www.blissend.com/forums/viewtopic.php?id=12&amp;action=new</link>
			<description><![CDATA[<p><span class="postimg"><img src="http://www.blissend.com/images/ssh_snooping.jpg" alt="ssh_snooping.jpg" /></span><br />Whenever I setup a linux server one of the ways I secure it is by making sure SSH is configured properly. Afterwards I have a little script to check your IP when logging in. If it doesn&#039;t match an allowed list an email alert is sent out and/or it disconnects you.</p><p>First, here are the changes I make to <strong>/etc/ssh/sshd_config</strong></p><ol class="decimal"><li><p>Find...<br /></p><div class="codebox"><pre><code>#Port 22
#Protocol 2,1</code></pre></div><p>Uncomment both and change the port and protocol to something like...<br /></p><div class="codebox"><pre><code>Port 1090
Protocol 2</code></pre></div><p>Removing &quot;<strong>,1</strong>&quot; sets it so that you are using the more up to date secure protocol.</p></li><li><p>Find...<br /></p><div class="codebox"><pre><code>#PermitRootLogin yes</code></pre></div><p>Change to...<br /></p><div class="codebox"><pre><code>PermitRootLogin no</code></pre></div><p>This will disable root logins. <strong>Be sure to create another user account that you can &quot;su - root&quot; to login into root</strong></p></li><li><p>Find...<br /></p><div class="codebox"><pre><code>#PasswordAuthentication yes
#PermitEmptyPasswords no</code></pre></div><p>Uncomment both lines. These do exactly what the variable name says.</p></li><li><p>Find...<br /></p><div class="codebox"><pre><code>#UseDNS no</code></pre></div><p>Change to...<br /></p><div class="codebox"><pre><code>UseDNS no</code></pre></div><p>This will stop the sshd from doing a DNS lookup which can be responsible for slow remote logins. Disabling this also allows the below script to function better.</p></li></ol><p>Once you are certain you have the port open and another user account to log in with and gain root access, then finally restart the service to finalize the change.</p><div class="codebox"><pre><code>service sshd restart</code></pre></div><p>Now one last thing you can do is to add a script that only allows logins from select IP addresses. Simply source it in .bashrc for the linux user account.</p><p>File <strong>blalert.sh</strong><br /></p><div class="codebox"><pre class="vscroll"><code>#!/bin/bash
#**************************************************************************
# Name: Bash Login Alert
#**************************************************************************
# Copyright 2010, 2011 blissend
# 
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see &lt;http://www.gnu.org/licenses/&gt;.
#**************************************************************************
# @author: blissend &lt;blissend@gmail.com&gt;
# @purpose: This script alerts by email of anyone logging in that doesn&#039;t 
#     match allowed IP addresses
#**************************************************************************

# Enter in all the IP addresses allowed to login vi ssh
ALLOWED_HOSTS=&quot;10.2.0.111 10.2.0.225&quot;
# Enter in the email address to email alerts to
EMAIL=your@domain.com
# 0 means just disconnect invalid user
# 1 means just email about unauthorized login
# 2 means email about unauthorized login and disconnect them
ACTION=1

#######################################
# END OF USER CONFIGURABLE SECTION
#######################################
INVALID=1
IP=`who -m | cut -d &#039;(&#039; -f2 | cut -d &#039;)&#039; -f1`
for a in $ALLOWED_HOSTS; do
    if [ &quot;$a&quot; == &quot;$IP&quot; ]; then
        INVALID=0
    fi
done
if [ $INVALID -eq 1 ]; then
    if [ $ACTION -eq 1 ]; then
        echo -e &#039;ALERT - Shell Access (&#039;`hostname`&#039;) on:&#039; `date` `who` | mail -s &quot;Alert: Shell Access from ${IP}&quot; $EMAIL
    elif [ $ACTION -eq 0 ]; then
        logout
    else
        echo -e &#039;ALERT - Shell Access (&#039;`hostname`&#039;) on:&#039; `date` `who` | mail -s &quot;Alert: Shell Access from ${IP}&quot; $EMAIL
        logout
    fi
fi</code></pre></div><p>You can use the above or use <strong>/etc/hosts.deny</strong> and <strong>/etc/hosts.allow</strong> to control who is allowed access or not.</p>]]></description>
			<author><![CDATA[dummy@example.com (blissend)]]></author>
			<pubDate>Wed, 29 Sep 2010 20:18:22 +0000</pubDate>
			<guid>http://www.blissend.com/forums/viewtopic.php?id=12&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[3D Movies Dying?]]></title>
			<link>http://www.blissend.com/forums/viewtopic.php?id=10&amp;action=new</link>
			<description><![CDATA[<div class="quotebox"><cite>PostalDude wrote:</cite><blockquote><div><p>Let &#039;s have a funeral for those 3D movies and games, because they can make them all they want, i won&#039;t see a single one of them, shutterglasses create headache and for people with epilepsy wouldn&#039;t even recommend that.</p><p>And oh hi thar Bliss <img src="http://www.blissend.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /></p></div></blockquote></div><p>I&#039;ll be wearing this black shirt for the funeral...<br /><span class="postimg"><img src="http://www.blissend.com/images/3dmovies_moneyback.jpg" alt="3dmovies_moneyback.jpg" /></span><br />Source: <a href="http://www.threadless.com/product/2386/Hollywood_Swindle/?from=slashfilm">http://www.threadless.com/product/2386/ … =slashfilm</a></p><p>If they could only do it without the glasses it would help but then there&#039;s still the problem when they force it on movies and don&#039;t do a good job at it (so even without the glasses it still sucks). It&#039;s like Hollywood found a new drug and they can&#039;t stop.</p>]]></description>
			<author><![CDATA[dummy@example.com (blissend)]]></author>
			<pubDate>Fri, 30 Jul 2010 15:19:11 +0000</pubDate>
			<guid>http://www.blissend.com/forums/viewtopic.php?id=10&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[New Server & Updated Theme]]></title>
			<link>http://www.blissend.com/forums/viewtopic.php?id=5&amp;action=new</link>
			<description><![CDATA[<p>Sorry, these forums had a thank you mod installed which had faulty coding by whomever made it. I fixed it. It will now display your reply <img src="http://www.blissend.com/forums/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /></p><div class="quotebox"><cite>Vathral wrote:</cite><blockquote><div><p>I approve this message! Don&#039;t have any clever image for this post but lets imagine one <img src="http://www.blissend.com/forums/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /> Cloud hosting looks nice but expensive but I guess that really depends on the usage. </p><p>awesome.jpg</p></div></blockquote></div><p>Expensive? They have similar pricing on softlayer except their cloud layer service offers more cheaper solutions but with lower hardware specs. For example...</p><p><a href="http://www.softlayer.com/dedicated/single-processor-multi-core/">Softlayer Dedicated Server</a><br /></p><ul><li><p>Dual Core</p></li><li><p>2 GB RAM</p></li><li><p>$159</p></li></ul><p><a href="http://www.softlayer.com/cloudlayer/computing/">Softlayer Cloudlayer Server</a><br /></p><ul><li><p>Dual Core</p></li><li><p>2 GB RAM</p></li><li><p>$159</p></li></ul><p>Also in related news about cloud services. It seems some big names are doing it as well like NASA, Intel, AMD. Check it out <a href="http://www.informationweek.com/news/smb/network/showArticle.jhtml?articleID=226000098&amp;subSection=News">http://www.informationweek.com/news/smb … ction=News</a></p>]]></description>
			<author><![CDATA[dummy@example.com (blissend)]]></author>
			<pubDate>Wed, 21 Jul 2010 20:50:01 +0000</pubDate>
			<guid>http://www.blissend.com/forums/viewtopic.php?id=5&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[Using IPTABLES to detect/change IP destination/source addresses]]></title>
			<link>http://www.blissend.com/forums/viewtopic.php?id=9&amp;action=new</link>
			<description><![CDATA[<p><span class="postimg"><img src="http://www.blissend.com/images/oneway_confusion.jpg" alt="oneway_confusion.jpg" /></span></p><p>Awhile ago, at work I had to setup specialized routing to remote servers from our local server. This, at the time, was my first attempt to do something slightly advanced in iptables and it took about a month to figure out (which felt like an eternity). We even had an expert onsite helping me but apparently how to do this eluded him until I figured it out. I guess not everyone knows how to use iptables.</p><p>Our network setup is like this...<br /><strong>Internet &lt;-&gt; Linux Router &lt;-&gt; Local Network &lt;-&gt; Local Server</strong></p><p>A cheap home wireless router has the ability to do this easily via port redirection. We had a server acting as a Linux router but with no GUI so it had to be done in iptables. This is how I figured it out and how to do it...</p><div class="codebox"><pre><code>iptables -t nat -A PREROUTING -i $EXT_IFACE1 -p tcp -d 33.33.33.33 -s 69.69.69.69 --dport 1415 -j DNAT --to-destination 10.2.0.222
iptables -t nat -A POSTROUTING -o $EXT_IFACE1 -p tcp -s 10.2.0.222 --dport 1415 -j SNAT --to-source 33.33.33.33</code></pre></div><p>That will effectively redirect traffic to an internal networked machine. However, in our case this wasn&#039;t enough because our internal machine has no internet access. The work around is to make the router your gateway by manipulating both source and destination because both can see the router. To do this, two more rules have to be applied which a cheap wireless router can not do...</p><div class="codebox"><pre><code>iptables -t nat -A PREROUTING -i $EXT_IFACE1 -p tcp -d 33.33.33.33 -s 69.69.69.69 --dport 1415 -j DNAT --to-destination 10.2.0.222
iptables -t nat -A POSTROUTING -o $INT_IFACE1 -p tcp -s 69.69.69.69 --dport 1415 -j SNAT --to-source 10.2.0.1
iptables -t nat -A PREROUTING -i $INT_IFACE1 -p tcp -d 10.2.0.1 -s 10.2.0.222 --dport 1415 -j DNAT --to-destination 69.69.69.69
iptables -t nat -A POSTROUTING -o $EXT_IFACE1 -p tcp -s 10.2.0.222 --dport 1415 -j SNAT --to-source 33.33.33.33</code></pre></div><ul><li><p>Example IP addresses only...</p></li><li><p><strong>Remote Server</strong> = 69.69.69.69</p></li><li><p><strong>Our External IP</strong> = 33.33.33.33</p></li><li><p><strong>Linux Router</strong> = 10.2.0.1</p></li><li><p><strong>Local Server</strong> = 10.2.0.222</p></li></ul><p>In the example above, on the first rule, we&#039;re trying to detect if anything is coming in from that remote server IP and on that port. If so, we change its destination from the external IP to a local server IP on our network.</p><p>The next challenge I had to change the incoming source IP to be the Linux router&#039;s IP. So now we have all incoming traffic from a specific IP on a specific port being manipulated so its source/destination IP have been changed. Example...</p><p><strong>Packet A</strong> - destination 33.33.33.33 port 1415 source 69.69.69.69<br /><strong>Packet A (manipulated)</strong> - destination 10.2.0.222 port 1415 source 10.2.0.1</p><p>To complete a roundtrip we simply detect if any outgoing traffic is coming from a specific local IP and port and manipulate its source/destination IP back to what it should be. Example...</p><p><strong>Packet B</strong> - destination 10.2.0.1 port 1415 source 10.2.0.222<br /><strong>Packet B (manipulated)</strong> - destination 69.69.69.69 port 1415 source 33.33.33.33</p><p>It&#039;s simple now that I look at it and easy too understand how to change a few numbers around to do what&#039;s needed like doing port redirection (the simplier version above).</p>]]></description>
			<author><![CDATA[dummy@example.com (blissend)]]></author>
			<pubDate>Tue, 20 Jul 2010 18:40:35 +0000</pubDate>
			<guid>http://www.blissend.com/forums/viewtopic.php?id=9&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[Debugging TF2/Sourcemod with Linux]]></title>
			<link>http://www.blissend.com/forums/viewtopic.php?id=8&amp;action=new</link>
			<description><![CDATA[<p>Not many know of this debugging method and I&#039;m surprised by that because its become invaluable for me in identifying crashes. For example sometimes you can&#039;t quite figure out which plugin in sourcemod is crashing or if its even a plugin&#039;s fault. So here is what you can do on Linux servers. </p><p>There is a tool called GDB (GNU Project Debugger, type man gdb for more info) that can help you identify the last problematic plugin/library/etc. before the crash. Valve has the option available as -debug but I&#039;m not familiar with how effective it is versus this method. I assume you are logged into the correct user before doing this (SSH into it with Putty or something).</p><ol class="decimal"><li><p>Make sure the LD_LIBRARY_PATH is set. If not you can probably type something like this...<br /></p><div class="codebox"><pre><code>export LD_LIBRARY_PATH=&quot;.:bin:$LD_LIBRARY_PATH&quot;</code></pre></div></li><li><p>Run the gdb command...<br /></p><div class="codebox"><pre><code>gdb srcds_linux</code></pre></div></li><li><p>Type run in the gdb and feed it the arguments to run srcds_linux...<br /></p><div class="codebox"><pre><code>run -console -game tf +ip XXX.XXX.XXX.XXX -port 27015 +maxplayers 32 +exec server.cfg -tickrate 66 +map cp_dustbowl</code></pre></div></li></ol><p>Now play the game like normal but keep watching that session you have opened at the same time. If it crashes, you can bet that something more useful will be shown there than the log files elsewhere.</p><p>If you don&#039;t want to use GDB yet then you can check the log files in <strong>~/srcds_l/orangebox/tf/logs</strong> and <strong>~/srcds_l/orangebox/tf/addons/sourcemod/logs</strong> and look for the times relevant to crash. For example browse to the sourcemod logs and type...</p><div class="codebox"><pre><code>grep &quot;07/11/2010 - 17:5&quot; *.log</code></pre></div><p>This will find all log lines on that date and in the past 10 minutes of hour 17:50-17:59.</p>]]></description>
			<author><![CDATA[dummy@example.com (blissend)]]></author>
			<pubDate>Sun, 11 Jul 2010 22:12:00 +0000</pubDate>
			<guid>http://www.blissend.com/forums/viewtopic.php?id=8&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[GrayOrange Theme for FluxBB]]></title>
			<link>http://www.blissend.com/forums/viewtopic.php?id=7&amp;action=new</link>
			<description><![CDATA[<p><span class="postimg"><img src="http://www.blissend.com/files/grayorange.png" alt="grayorange.png" /></span><br /><span class="postimg"><img src="http://www.blissend.com/files/grayorange2.png" alt="grayorange2.png" /></span><br /><a href="http://www.blissend.com/files/grayorange.zip">Download</a></p><p>This is just the air theme using the older fluxbb mercury color scheme instead. I like the air theme but wanted something darker.</p><p>To install simply extract into your forums style folder. Easy 8)</p>]]></description>
			<author><![CDATA[dummy@example.com (blissend)]]></author>
			<pubDate>Fri, 09 Jul 2010 21:33:52 +0000</pubDate>
			<guid>http://www.blissend.com/forums/viewtopic.php?id=7&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[Random Tips for Load Balancing on Linux]]></title>
			<link>http://www.blissend.com/forums/viewtopic.php?id=6&amp;action=new</link>
			<description><![CDATA[<p>At work, we have a complicated network setup dealing with load balancing and fail overs. The majority of it is my own custom setup as I was tasked with implementing it. During this process I hit many road blocks but thankfully found some useful tips that aided in my setup. Note, I will explain my custom setup in another post but for now here are the tips and what I was doing.</p><p>You may or may not know that you can use Linux as a router to balance traffic between two or more internet providers. The more official explanation on how is located at <a href="http://lartc.org/lartc.html#LARTC.RPDB.MULTIPLE-LINKS">http://lartc.org/lartc.html#LARTC.RPDB.MULTIPLE-LINKS</a>. Using this you create a table for each ISP and define its routing. From there you define how to balance traffic across those tables or in other words, define which ISP you&#039;ll be using.</p><p>In our case we manipulated the balance of traffic so that <strong>everything</strong> goes across one table (or one ISP) except traffic going to a specific IP which will then go across a different table (different ISP). This effectively makes certain sites have priority to go across a faster internet line so that people at work get faster access to the sites they need.</p><p>We can manually add/remove/change IP addresses on the fly to dictate which ISP we want it to use. The problem is that the routing becomes cached so if you do not clear that cache, then adding a new IP address will not change which ISP it&#039;ll use. Here is a tip on how to identify and solve this problem...</p><div class="codebox"><pre><code>[root@natny ~]# ip route show cache 123.123.123.123
123.123.123.123 from 10.2.0.135 via 88.88.88.88 dev eth2  src 10.2.0.1
    cache &lt;src-direct&gt;  mtu 1500 advmss 1460 hoplimit 64 iif eth0
123.123.123.123 from 10.2.0.3 via 88.88.88.88 dev eth2 src 10.2.0.1
    cache &lt;src-direct&gt;  mtu 1500 advmss 1460 hoplimit 64 iif eth0
[root@natny ~]# ip route flush cache
[root@natny ~]# ip rule add to 123.123.123.123 table T1</code></pre></div><p>In the above example if you manually use <strong>ip rule add</strong> before flushing cache then it won&#039;t go across T1 which is eth1 (one ISP) because cache says T2 which is eth2 (another ISP) is where that IP will go for those two users using the network.</p><p>Another concern of mine was knowing if this setup was actively working. How can one tell? Well one way is to ssh into a remote server you specified to a table (or ISP).</p><div class="codebox"><pre><code>aww_man@pileofdirt ~
$ ssh randomserver
[aww_man@randomserver ~]$ who
aww_man pts/0        2010-07-06 11:19 (88.88.88.88)
[aww_man@randomserver ~]$</code></pre></div><p>In the above example, the IP shown in the curly brackets is the IP you want to check for to see if you&#039;re going across the right ISP. Another way to test is to use something like whatismyip.org and make its IP go across a certain table. Then when you visit the site it should report your external IP of the right ISP.</p><p>You can also monitor if the line is actively being used. Linux has a few tools installed by default like tcpdump but I like using another one you have to download separately called bwm-ng (<a href="http://www.gropp.org/?id=projects&amp;sub=bwm-ng">http://www.gropp.org/?id=projects&amp;sub=bwm-ng</a>). I like this one because of its simple output shown in the example below.</p><p><span class="postimg"><img src="http://www.blissend.com/images/bwm-ng.png" alt="bwm-ng example" /></span></p><p>We also have speed limits put in place and this example above helps determining if those limits are working. A very nice script that can implement the limits is found at <a href="http://lartc.org/wondershaper/">http://lartc.org/wondershaper/</a>. This is great for asynchronous lines because if you max out your upload speed you will effectively cripple the download speed and thus everyone else who is sharing that line. So we use this to place a cap on these lines.</p><p>Using the wondershaper script you can also tell if speed limits are working by typing something like &quot;<strong>tc -s qdisc ls dev eth2</strong>&quot; or using the script itself by typing &quot;<strong>./wondershaper_modified.htb status</strong>&quot; and the script even has a stop function &quot;<strong>./wondershaper_modified stop</strong>&quot;</p><p>My next issue was finding out where this bandwidth is going. I needed to know at times if there is someone hogging the internet line and what they were doing with it. I also needed to know if certain sites should have higher or lower priority. So to find this info out you can just simply use a tool called ntop (<a href="http://www.ntop.org">http://www.ntop.org</a>).</p><p>After installing it, you can start it by typing something like &quot;<strong>ntop -w 3000 -i eth0</strong>&quot; where eth0 is our local network. Afterwards open your browser to its internal IP (i.e. <a href="http://10.2.0.1:3000">http://10.2.0.1:3000</a>). Then click <strong>IP navigation -&gt; Traffic Direction -&gt; Local to Remote</strong> and you&#039;ll find who&#039;s hogging bandwidth and what they&#039;re doing online. Or click <strong>IP Navigation -&gt; Summary -&gt; Internet Domain</strong> and you can sort these by traffic sent/received to determine if anything needs higher priority on the wondershaper script or lower priority like youtube.com. Press &quot;<strong>ctrl + c</strong> to stop ntop as you won&#039;t want it running all day if only doing quick checks.</p><p>So there you have it. Many tips but no idea how to really set this all up <img src="http://www.blissend.com/forums/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /> However as I said I&#039;ll explain how to set it up more in the next post or maybe split that up into parts.</p>]]></description>
			<author><![CDATA[dummy@example.com (blissend)]]></author>
			<pubDate>Thu, 08 Jul 2010 16:13:08 +0000</pubDate>
			<guid>http://www.blissend.com/forums/viewtopic.php?id=6&amp;action=new</guid>
		</item>
	</channel>
</rss>

