Welcome, to my new playground. :-)

Welcome, to my new playground. 😆

As I’ve noticed Tumblr being very liberal in regards to the use of javascript, and custom css. I’ve decided, no I’ve more or less chosen, to spend more time on my tumblr.

Things I’ve changed:
Custom CSS:

In the “ custom css ” section, of tumblr’s customize section.

pre.prettyprint {
font-family: 'Noticia Text', serif;
font-size:0.8em;
overflow-x: auto;
margin: 5px 5px 5px;
color: #ff6600;
background-color: #d3d3d3;
}
h1{font-family:'Ubuntu', sans-serif;font-size:1.8em;margin-bottom:0em;font-weight:bold;margin-top:0;text-shadow:4px 4px 4px #666666;}
h4{font-family:'Ubuntu', sans-serif;font-size:1.4em;margin-bottom:0em;font-weight:bold;margin-top:0;text-shadow:2px 2px 2px #4c4c4c;}
h5{font-family:'Ubuntu', sans-serif;font-size:1.2em;margin-bottom:0em;font-weight:bold;margin-top:0;text-shadow:4px 4px 4px #333333;}
p{font-family:'Ubuntu', sans-serif;font-size:1.0em;text-align:left;margin-top:0.5em;margin-bottom:0.5em;text-shadow:1px 1px 1px #191919;text-indent:1em;padding:0.15cm;}
Google-Fonts

I’ve added “ google-fonts ” to the equation:

	<link href="https://fonts.googleapis.com/css?family=Ubuntu&subset=latin,greek-ext" rel="stylesheet" type="text/css" />
	<link href="https://fonts.googleapis.com/css?family=Noticia+Text" rel="stylesheet" type="text/css" />
The acquiring of new skills.

And I’m learning new skills, as I go …

<a name="_top"></a>
[TB]: https://www.tumblr.com/  "Tumblr main."
[ddgw]: https://duckduckgo.com/?q=wysiwyg+!google "What you see is what you get"
[ddgp]: https://duckduckgo.com/?q=plain+text+editing+for+die+hard+coders.+!google "Real coders prefer RAW! :-D"
[ddgh]: https://duckduckgo.com/?q=How+to+use+markdown+on+tumblr+!google  "Duck duck goose!"
[MD]:http://daringfireball.net/projects/markdown/syntax+!google "Markdown's syntax."

I'm so used, to either use [tumblr][TB]'s [wysiwyg][ddgw] editor, or its [plain-text][ddgp] one, while blogging/reblogging on here. That I had totally forgotten [about markdown][MD]. lol

Granted, it takes a little time to get used to. But I like it so far. ;-)

Ok, enough with the chitchat, it's time for ...

***

**EXAMPLES**

#### Example Header &lt;h4&gt;  
(let's stay modest, unless we wish to shout, the &lt;h1&gt; tag tends to give me that feel :-) ).

# SEE WHAT I MEAN! HA! :-D ← &lt;h1&gt;

##### Example Section &lt;h5&gt;.

This is a paragraph.

This is another paragraph.

**This word** will be in **bold**, and *this one* will be in *italics*.

This is a para-  
graph with line-  
breaks.

This is an unordered list, with hanging indents.

* Lorem ipsum dolor sit amet, consectetuer adipiscing elit.  
Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,  
viverra nec, fringilla in, laoreet vitae, risus.
* Donec sit amet nisl. Aliquam semper ipsum sit amet velit.  
Suspendisse id sem consectetuer libero luctus adipiscing.

This is an ordered list:

1. Apples.
2. Oranges.
3. Pears.

> There is room for *a fancy quote*.
>> &laquo; On this line. &raquo;

How [to use markdown][ddgh] on [tumblr][TB]?
Speaking of javascript:

Google Translate Widget:

// Place the following, where you'd like your translate container to appear.
// <div id="google_translate_element"></div>
<script type="text/javascript">
function googleTranslateElementInit() {
  new google.translate.TranslateElement({pageLanguage: 'en', layout: google.translate.TranslateElement.FloatPosition.TOP_LEFT, multilanguagePage: true}, 'google_translate_element');
}
</script>
<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>

Custom search engine:

<script>
  (function() {
    var cx = 'getYourOwnDarnCode';
    var gcse = document.createElement('script');
    gcse.type = 'text/javascript';
    gcse.async = true;
    gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
        '//www.google.com/cse/cse.js?cx=' + cx;
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(gcse, s);
  })();
</script>
// Place the follwowing, where you'd like your cse to appear.
// <gcse:search></gcse:search>
TinyURL:

TinyURL form:

<form action="https://tinyurl.com/create.php" method="post" target="_blank">
<table align="center" cellpadding="5" bgcolor="#E7E7F7">
  <tr>
  <td>
  <strong>Enter a long URL to make <a target="_blank" href="https://tinyurl.com">tiny</a>:</strong><br />
  <input type="text" name="url" size="30"><input type="submit" name="submit" value="Make TinyURL!">
  </td>
  </tr>
</table>
</form>

Considering my tendency to tinker, while editing my tumblr’s html. Where apllicable, and available (and yes I checked them all! 😆 ), I turned on, the ssl counterpart, of every link I found in its source. It would be nice, if all parties concerned, would turn this on, by default. 😉


As for me,

I’ve more or less … “ Removed myself from the equation.

Walk along, nothing to see here.

Walk along, nothing to see here.

Act, don't think.

“ Act, don’t think … (Drink!) ! ”


That’s all folks! 😆

Kindest regards,

Alex

ღ Ƹ̵̡ Ӝ̵̨̄ Ʒ ☆ ˜ ” * ° • . ¸ł¸ . • ° * ” ☆ ★ ☆ ę ˜

♫ d(。◕‿◕。)b ♪♪

Use the contact-form below, for feedback purposes.







Back to top.

Slideshow and image gallery!

 

 

« Truth resides in every human heart, and one has to search for it there, and to be guided by truth as one sees it. But no one has a right to coerce others to act according to his own view of truth. »

Mohandas Gandhi.

AFOTW.

Unfortunately I don’t know who made these images (I can’t read the script used (yet!))??? All I know is… I find them highly intriguing, they were made in 2002 © and I felt like sharing! 🙂

This slideshow requires JavaScript.


That’s all folks!

Kindest regards,

Alex

♫ d(。◕‿◕。)b ♪♪

PS: My words are my own, my actions are my own. Everything I wrote and did in this post are my own responsibility. All I’m offering is: YAP! 😉

«Everything we do (in life) is meaningless, without the appropriate conviction

Before you comment!?


All characters appearing in this work are fictitious.
Any resemblance to real.
persons, living or dead, is purely coincidental.

Back to top.

Too good to pass up on…! « I’ve found my Easter Egg today. ;-)

It’s your first impression: &laqou; When you put your unedited work out there, that’s what they see as your business-model, basically. And when you have your work edited and perfected, it will be better for you. »

^ So basically, never let your client see your unedited work. Good Advice. 😉

Just felt like being creative for a change (again). :-)

Short but sweet (again)!

Here have a random collection of pictures I shot the other day with my rather aging mobile phone. <- Enhanced and edited for your (but mostly mine! 😉 ) viewing pleasure.

Gallery here:

Slideshow goes here:

This slideshow requires JavaScript.

Always learning:

That’s all folks!

Kindest regards,

Alex

PS: My words are my own, my actions are my own. Everything I wrote and did in this post are my own responsibility. All I’m offering is: YAP! 😉

«Everything we do (in life) is meaningless, without the appropriate conviction

Before you comment!?

Back to top.

In your end though…

Innuendos and illusions.

As the big fan of wordplay that I am. Today I am going to point out the ambiguousness of the English language. A feat. both loved and hated by myself.

Thus this link is for Your amusement and entertainment only:
http://uncyclopedia.wikia.com/wiki/Innuendo

^ Note: Not for the serious or the weak!

  • Did the article make you chuckle? Then we might get along pretty well. 😉
  • Did it infuriate you? Then we probably won’t get along that well.
  • Did it do something else? Again we probably won’t get along and your mind is probably ‘dirtier‘ (how is that even possible!?) than mine.

Since I believe it is always best to talk through images instead of text only. Because text only, sincerely leaves to much room for other interpretations.

Then again: What’s it like. 😀

Time for a break, no!?

Speaking of WOKs and my sincere dislike for having to type to much. Especially when this concerns me to have to churn out several tidbits or chunks of pure html in my posts. 😉

This ‘global.xml’ snippet will only work in Gedit though.
(But I felt like sharing anyway. :lol:)

↑ Yes, I know the text looks garbled up. Perhaps it’s their markdown parser expecting well formatted .md files, while it should be .xml ‽

<?xml version='1.0' encoding='utf-8'?>
<snippets>
  <snippet>
    <text><![CDATA[\`\`\`bash
$1
\`\`\`
]]></text>
    <tag>wpb</tag>
    <description>Code bash wp</description>
  </snippet>
  <snippet>
    <text><![CDATA[> $1

$0]]></text>
    <tag>bq</tag>
    <description>blockquote</description>
  </snippet>
  <snippet>
    <text><![CDATA[[$1]($2 "$3") $0]]></text>
    <tag>ref</tag>
    <description>ahref</description>
  </snippet>
  <snippet>
    <text><![CDATA[<a target="_blank" title="$1" href="$2">$3</a>$0]]></text>
    <tag>ablank</tag>
    <description>ablank</description>
  </snippet>
  <snippet>
    <text><![CDATA[$1**$2** $0]]></text>
    <tag>b</tag>
    <description>strong</description>
  </snippet>
  <snippet>
    <text><![CDATA[_$1_ $0]]></text>
    <tag>i</tag>
    <description>em</description>
  </snippet>
  <snippet>
    <text><![CDATA[#!/bin/bash -
# Modified: Today by E.L.F.
#
## Licensed as:
## http://www.opensource.org/licenses/mit-license.php
#
## Script-name - $GEDIT_FILENAME
#
]]></text>
    <tag>mit</tag>
    <description>mit</description>
  </snippet>
  <snippet>
    <text><![CDATA[*   ${1:item 1}
*   ${2:item 2}
*   ${3:item 3}
*   ${4:item 4}

$0]]></text>
    <tag>ul</tag>
    <description>ul</description>
  </snippet>
  <snippet>
    <text><![CDATA[$1“ $2 ”$0]]></text>
    <tag>dq</tag>
    <description>dquo</description>
  </snippet>
  <snippet>
    <text><![CDATA[1.   ${1:item 1}
2.   ${2:item 2}
3.   ${3:item 3}
4.   ${4:item 4}

$0]]></text>
    <tag>ol</tag>
    <description>ol</description>
  </snippet>
  <snippet>
    <text><![CDATA[$1<sup>$2</sup>$0]]></text>
    <tag>sup</tag>
    <description>sup</description>
  </snippet>
  <snippet>
    <text><![CDATA[$1<sub>$2</sub>$0]]></text>
    <tag>sub</tag>
    <description>sub</description>
  </snippet>
  <snippet>
    <text><![CDATA[#### ${1:chapter}

$0
]]></text>
    <tag>chap</tag>
    <description>chapter</description>
  </snippet>
  <snippet>
    <text><![CDATA[<a title="$1">$2</a>$0]]></text>
    <tag>atitle</tag>
    <description>atitle</description>
  </snippet>
  <snippet>
    <text><![CDATA[$1
*[$1]: $2

$0]]></text>
    <tag>abbr</tag>
    <description>abbr</description>
  </snippet>
  <snippet>
    <text><![CDATA[<acronym title="$1">$2</acronym>$0]]></text>
    <tag>acro</tag>
    <description>acro</description>
  </snippet>
  <snippet>
    <text><![CDATA[<p>$1</p>]]></text>
    <tag>p</tag>
    <description>p</description>
  </snippet>
  <snippet>
    <text><![CDATA[<table summary="${1:This is a table summary.}" border="${2:With most likely border ‘ 0 ’}">
$3
</table>
$0]]></text>
    <tag>table</tag>
    <description>table</description>
  </snippet>
  <snippet>
    <text><![CDATA[<tr>
	$1
</tr>
$0]]></text>
    <tag>tr</tag>
    <description>tr</description>
  </snippet>
  <snippet>
    <text><![CDATA[<td>$1</td>
$0]]></text>
    <tag>td</tag>
    <description>td</description>
  </snippet>
  <snippet>
    <text><![CDATA[$1« $2 »$0]]></text>
    <tag>aq</tag>
    <description>aquo</description>
  </snippet>
  <snippet>
    <text><![CDATA[[$1]: $2 "$3"
![Alt $3][$1]

$0]]></text>
    <tag>img</tag>
    <description>img</description>
  </snippet>
  <snippet>
    <text><![CDATA[$1  
$0]]></text>
    <tag>br</tag>
    <description>br</description>
  </snippet>
  <snippet>
    <text><![CDATA[##### ${1:section}

$0]]></text>
    <tag>sec</tag>
    <description>section</description>
  </snippet>
  <snippet>
    <text><![CDATA[http://$1$0]]></text>
    <tag>audio</tag>
    <description>audio</description>
  </snippet>
  <snippet>
    <text><![CDATA[***

$0]]></text>
    <tag>hr</tag>
    <description>hr</description>
  </snippet>
  <snippet>
    <text><![CDATA[ 1
$
$0]]></text>
    <tag>latex</tag>
    <description>LaTeX</description>
  </snippet>
  <snippet>
    <text><![CDATA[<pre class="prettyprint">
<code>
$1
</code>
</pre>
$0]]></text>
    <tag>pp</tag>
    <description>prettyprint</description>
  </snippet>
  <snippet>
    <text><![CDATA[<a name="_top"></a>
$0
<em><a href="#_top">Back to top.</a></em>]]></text>
    <tag>anchor</tag>
    <description>anchor</description>
  </snippet>
  <snippet>
    <text><![CDATA[\`\`\`
$1
\`\`\`
]]></text>
    <tag>wpt</tag>
    <description>Code text wp</description>
  </snippet>
  <snippet>
    <text><![CDATA[$1 …$0]]></text>
    <tag>dot</tag>
    <description>punctuation hellip</description>
  </snippet>
  <snippet>
    <text><![CDATA[$1» $2 «$0]]></text>
    <tag>iq</tag>
    <description>iquo</description>
  </snippet>
  <snippet>
    <text><![CDATA[[^$1] $2 
[^$1]: [$3]($4 "$3")

$0
]]></text>
    <tag>cite</tag>
    <description>cite</description>
  </snippet>
  <snippet>
    <text><![CDATA[$1
:   $2

$0]]></text>
    <tag>dl</tag>
    <description>define</description>
  </snippet>
  <snippet>
    <text><![CDATA[&lt;$1&gt;$0]]></text>
    <tag>ab</tag>
    <description>Angle brackets</description>
  </snippet>
  <snippet>
    <text><![CDATA[<!--
$1
-->
$0]]></text>
    <tag>cm</tag>
    <description>comment (html)</description>
  </snippet>
  <snippet>
    <text><![CDATA[$1 — $2 — $0]]></text>
    <tag>em</tag>
    <description>mdash</description>
  </snippet>
  <snippet>
    <text><![CDATA[https://duckduckgo.com/?q=${1:my+query}+!google]]></text>
    <tag>qddg</tag>
    <description>Query</description>
  </snippet>
  <snippet>
    <text><![CDATA[‘ $1 ’$0]]></text>
    <tag>sq</tag>
    <description>squo</description>
  </snippet>
  <snippet>
    <text><![CDATA[$1’$0]]></text>
    <tag>q</tag>
    <description>quo</description>
  </snippet>
  <snippet>
    <text><![CDATA[$1 \
$0]]></text>
    <tag>bsn</tag>
    <description>backslash newline</description>
  </snippet>
  <snippet>
    <text><![CDATA[\textbackslash$0]]></text>
    <tag>tbs</tag>
    <description>textbackslash</description>
  </snippet>
  <snippet>
    <text><![CDATA[&amp;#$1;$0]]></text>
    <tag>amp</tag>
    <description>literal character entries</description>
  </snippet>
  <snippet>
    <text><![CDATA[\($1\)$0]]></text>
    <tag>imj</tag>
    <description>Inline MathJax</description>
  </snippet>
  <snippet>
    <text><![CDATA[\[
$1
\]

$0]]></text>
    <tag>dmj</tag>
    <description>Display MathJax</description>
  </snippet>
  <snippet>
    <text><![CDATA[[#$1](https://www.tumblr.com/tagged/$1 "Tagged as: $1")$0]]></text>
    <tag>tt</tag>
    <description>Tumblr tag</description>
    <accelerator><![CDATA[<Primary><Alt>p]]></accelerator>
  </snippet>
  <snippet>
    <text><![CDATA[\$0]]></text>
    <tag>bs</tag>
    <description>backslash</description>
  </snippet>
  <snippet>
    <text><![CDATA[$1 ♥ $0]]></text>
    <tag>heart</tag>
    <description>heart</description>
  </snippet>
  <snippet>
    <text><![CDATA[$1∴  $0]]></text>
    <tag>therefore</tag>
    <description>punctuation therefore</description>
  </snippet>
  <snippet>
    <text><![CDATA[$1∵ $0]]></text>
    <tag>because</tag>
    <description>Because</description>
  </snippet>
  <snippet>
    <text><![CDATA[$1 ‽$0]]></text>
    <tag>ib</tag>
    <description>punctuation Interrobang</description>
  </snippet>
  <snippet>
    <text><![CDATA[ $1 $0]]></text>
    <tag>ts</tag>
    <description>punctuation thin space</description>
  </snippet>
  <snippet>
    <text><![CDATA[[e.g.](https://en.wikipedia.org/wiki/E.g.#e.g. "Exempli gratia. - For example. - Bijvoorbeeld.") $0]]></text>
    <tag>eg</tag>
    <description>e.g.</description>
  </snippet>
  <snippet>
    <text><![CDATA[[i.e.](https://en.wikipedia.org/wiki/List_of_Latin_phrases_%28I%29 "Id est. - In other words. - Met andere woorden.") $0]]></text>
    <tag>ie</tag>
    <description>i.e.</description>
  </snippet>
  <snippet>
    <text><![CDATA[$1  
[\[ sic \]](https://en.wikipedia.org/wiki/Sic "Sic erat scriptum. - Thus it was written. - Zoals geschreven.")

$0]]></text>
    <tag>sic</tag>
    <description>sic</description>
  </snippet>
  <snippet>
    <text><![CDATA[$1 — $0]]></text>
    <tag>dd</tag>
    <description>source</description>
  </snippet>
  <snippet>
    <text><![CDATA[$1 ⇌ $0]]></text>
    <tag>rb</tag>
    <description>Reblog</description>
  </snippet>
  <snippet>
    <text><![CDATA[$1 $0]]></text>
    <tag>hs</tag>
    <description>punctuation hair space</description>
  </snippet>
  <snippet>
    <text><![CDATA[$1 $0]]></text>
    <tag>tm</tag>
    <description>punctuation thick space</description>
  </snippet>
  <snippet>
    <text><![CDATA[$1 ☮ $0]]></text>
    <tag>peace</tag>
    <description>peace</description>
  </snippet>
  <snippet>
    <text><![CDATA[$1 ☯ $0]]></text>
    <tag>mind</tag>
    <description>mind</description>
  </snippet>
  <snippet>
    <text><![CDATA[$1 Ⓛ.⒰.⒳. $0]]></text>
    <tag>lux</tag>
    <description>lux</description>
  </snippet>
  <snippet>
    <text><![CDATA[$1 Ⓐ.Ⓛ.Ⓜ. $0]]></text>
    <tag>alm</tag>
    <description>ALM</description>
  </snippet>
  <snippet>
    <text><![CDATA[$1 Ⓔ.Ⓛ.Ⓕ. $0]]></text>
    <tag>elf</tag>
    <description>ELF</description>
  </snippet>
  <snippet>
    <text><![CDATA[$1 Ⓛ.⒠.⒳. Ⓛ.⒰.⒯.⒣.⒪.⒭. $0]]></text>
    <tag>lex</tag>
    <description>lex</description>
  </snippet>
  <snippet>
    <text><![CDATA[[#$1](https://wordpress.com/tag/$1 "Tagged as: $1")$0]]></text>
    <tag>wt</tag>
    <description>Wordpress tag</description>
  </snippet>
  <snippet>
    <text><![CDATA[$1 ⸮$0]]></text>
    <tag>im</tag>
    <description>punctuation irony mark</description>
  </snippet>
  <snippet>
    <text><![CDATA[$1 !$0]]></text>
    <tag>nb</tag>
    <description>punctuation bang</description>
  </snippet>
  <snippet>
    <text><![CDATA[$1 ?$0]]></text>
    <tag>qm</tag>
    <description>punctuation question</description>
  </snippet>
  <snippet>
    <text><![CDATA[$1 :$0]]></text>
    <tag>dp</tag>
    <description>punctuation colon</description>
  </snippet>
  <snippet>
    <text><![CDATA[$1 ✰ $0]]></text>
    <tag>vn</tag>
    <description>Human</description>
  </snippet>
  <snippet>
    <text><![CDATA[$(1:echo "$GEDIT_SELECTED_TEXT"|sed -e 's_ _ _g')]]></text>
    <accelerator><![CDATA[<Primary><Alt>x]]></accelerator>
    <tag>space</tag>
    <description>Title with thick spaces</description>
  </snippet>
  <snippet>
    <text><![CDATA[<a href="https://cloudup.com/$1?chromeless">https://cloudup.com/$1?chromeless</a>

 — Get it [here](https://cloudup.com/$1).
]]></text>
    <tag>ecu</tag>
    <description>Embed Cloudup</description>
  </snippet>
  <snippet>
    <text><![CDATA[

Watch [this video](https://www.youtu.be/$1 "${2:Some video}") on [YouTube](https://www.youtube.com).
]]></text>
    <tag>eyt</tag>
    <description>Embed YouTube</description>
  </snippet>
</snippets>
Act, don't think.

“ Act, don’t think … (Drink!) ! ”


That’s all folks! 😆

Kindest regards,

Alex

ღ Ƹ̵̡ Ӝ̵̨̄ Ʒ ☆ ˜ ” * ° • . ¸ł¸ . • ° * ” ☆ ★ ☆ ę ˜

♫ d(。◕‿◕。)b ♪♪

Use the contact-form below, for feedback purposes.







Back to top.

Target : Self.

So you want to browse anonymously and help others to achieve the same goal!?

Updated today: Thursday, November 17, 2011
Reason: Script should be near perfect, i.e. bulletproof and foolproof. If not? Then I’m only an email away. 😉

Republished again today: Wednesday, November 09, 2011 <– Thus qualifies as a *bump*
The MAIN reason.

The title also refers to making relays better accessible.

The simplest and best solution I can think of is: For you to visit their website https://www.torproject.org/ and read up on what Tor can and can not do for you!

When you’re convinced of the benefits of anonymous browsing, then…

Click on the Download Tor link, select your platform and be off on your merry way! 😆 Yes folks that is all there is to it.


But

While the info above is useful for the above average tor user. I however felt the need to write out a script for those of us who wish to make an ‘advanced’ use of Tor’s capabilities while at the same time making sure that our Relay actually can be reached by those who need it the most!

Advanced‘ refers to being able to change your sources.list: in either Debian or Ubuntu and thus being able to either configure a relay in a graphical fashion or the manual “hard” way on your own.

I got my info from here and I wanted to simplify matters.
HowcanImakemyrelayaccessibletopeoplestuckbehindrestrictivefirewalls

Based on my platform of preference, this will only work for G.Linux but feel free to add your own (ask nicely and I’ll add it in.) This script can be used in conjunction with the iptables howto I wrote earlier. If NOT, then be sure to replace the ‘tobesortedout’ chain with ‘INPUT’ (default) or your own (if defined?).

Modified: Today (20 Nov. 2011) by E.L.F.
Reason: Completely rewritten and should proof to be satisfactory. If not!? 😉

The Port forwarding Script goes here:
Available as a Demo only, on this page.

#!/bin/bash
# Modified: Today by E.L.F.
#
## Licensed as:
## http://www.opensource.org/licenses/mit-license.php
#
## Script-name - Pf.Tor.sh
#
## Define some colors first:
RED="\033[0;31m"
BLUE="\033[1;34m"
CYAN="\033[1;36m"
YELLOW="\033[1;33m"
NC="\033[0m" # No Color
## --> Nice. Has the same effect as using "ansi.sys" in DOS.
set -e
#if [ ! "$USER" = root ];then
#  echo -e ${RED}"\tError:${CYAN} \""$USER"\"${YELLOW} isn't allowed to use this script!"${NC};exit 0
#else
#  echo -e ${BLUE}"\t"$USER" may proceed.\n\t${CYAN}May peace be with you."${NC}
#  echo
#fi
clear
SCRIPT=$(basename "$0")
## Trying to be "standard compliant here".
if [ ! -f /etc/iptables.rules ]
then
echo -e ${YELLOW}"\tYou haven't created a firewall as per the author's instructions."${NC}
echo -e ${YELLOW}"\tPlease create the file mentioned or point this script to the right one."${NC}
echo -e ${YELLOW}"\tOr point this script to the one you use instead."${NC}
exit 0
else
echo
echo -e ${BLUE}"\tEverything's OK."${NC}
fi
clear
## It is always useful to know one's internal ipaddress.
echo -e "*-------------------------------${CYAN}${SCRIPT}${NC}----------------------------------*"
WAN=$(netstat -r -n | sed -e "s/^0\.0\.0\.0 *\([0-9.]*\).*/\1/p" -e d )
echo -e ${BLUE}"\tYour router's IP address is: "${NC}
echo -e ${CYAN}"\t$WAN"${NC}
LAN=$(ifconfig $(netstat -r -n | sed -e "s/^0\.0\.0\.0 *.* \([^ ]*\)/\1/p" -e d ) | sed -e 's/ *inet addr:\([0-9.]*\).*/\1/p' -e d )
echo -e ${BLUE}"\tYour IP address is: "${NC}
echo -e ${CYAN}"\t$LAN"${NC}
echo "*--------------------------------------------------------------------------*"
echo
MIN=2
MAX=4
if [ "$#" -eq "0" -o "$#" -eq "1" -o "$#" -eq "3" -o "$#" -gt "$MAX" ]
  then echo -e ${YELLOW}"\tThe ${CYAN}"$SCRIPT"${YELLOW} script needs at least 2 and at most 4 options."${NC}
  echo -e ${YELLOW}"\tUsage:${CYAN} "$SCRIPT" 443 9001${YELLOW} or ${CYAN}"$(basename "$0")" 443 9001 80 9030"${NC}
  echo -e ${RED}"\tWARNING${YELLOW}: For any port chosen under 20 this script will${CYAN} EXIT${YELLOW}!"${NC}
  exit 0
## Assume BOTH.
elif [ "$#" -eq "$MAX" ];then
  if [[ "$1" =~ [^0-9]+ ]] || [[ "$2" =~ [^0-9]+ ]] || [[ "$3" =~ [^0-9]+ ]] || [[ "$4" =~ [^0-9]+ ]]
  then echo -e ${YELLOW}"\tOnly numerical input is allowed.\n\tE.g.:${CYAN} 443 9001 80 9030"${NC};exit 0;fi
  if [ "$1" -le 20 -o "$3" -le 20 ];then echo -e ${YELLOW}"\tPorts can't be less than 20!"${NC};exit 0;fi
  if [ "$1" -ge 1025 -o "$2" -le 1024 -o "$3" -ge 1025 -o "$4" -le 1024 ];then exit 0
  else [ "$1" -le 1024 -a "$2" -ge 1025 -a "$3" -le 1024 -a "$4" -ge 1025 ];fi
  RELAY="$1";ORPORT="$2";DIR="$3";DIRPORT="$4";NODIR=NO
## Assume ORPORT only.
elif [ "$#" -eq "$MIN" ];then
  if [[ "$1" =~ [^0-9]+ ]] || [[ "$2" =~ [^0-9]+ ]];then echo -e ${YELLOW}"\tOnly numerical input is allowed.\n\tE.g.:${CYAN} 443 9001"${NC};exit 0;fi
  if [ "$1" -le 20 ];then echo -e ${YELLOW}"\tPorts can't be less than 20!"${NC};exit 0;fi
  if [ "$1" -ge 1025 -o "$2" -le 1024 ];then exit 0;else [ "$1" -le 1024 -a "$2" -ge 1025 ];fi
  RELAY="$1";ORPORT="$2";NODIR=YES
else
  exit 0
fi
if [ "$NODIR" = YES ];then
  echo -e ${CYAN}"iptables -I tobesortedout 3 -i eth0 -p tcp -m tcp --dport "$ORPORT" --tcp-flags FIN,SYN,RST,ACK SYN -m connlimit --connlimit-above 16 --connlimit-mask 24 -j REJECT --reject-with tcp-reset"${NC}
  echo -e ${CYAN}"iptables -I tobesortedout 4 -i eth0 -p tcp -m tcp --dport "$ORPORT" -m state --state NEW -m limit --limit 20/sec --limit-burst 40 -j ACCEPT"${NC}
  echo -e ${CYAN}"iptables -t nat -A PREROUTING -p tcp -d "$LAN" --dport "$RELAY" -j DNAT --to-destination "$LAN":"$ORPORT""${NC}
  echo -e ${CYAN}"iptables -t nat -A OUTPUT -p tcp -d "$WAN" --dport "$RELAY" -j DNAT --to-destination "$LAN":"$ORPORT""${NC}
else [ "$NODIR" = NO ]
  echo -e ${CYAN}"iptables -I tobesortedout 3 -i eth0 -p tcp -m tcp --dport "$ORPORT" --tcp-flags FIN,SYN,RST,ACK SYN -m connlimit --connlimit-above 16 --connlimit-mask 24 -j REJECT --reject-with tcp-reset"${NC}
  echo -e ${CYAN}"iptables -I tobesortedout 4 -i eth0 -p tcp -m tcp --dport "$ORPORT" -m state --state NEW -m limit --limit 20/sec --limit-burst 40 -j ACCEPT"${NC}
  echo -e ${CYAN}"iptables -t nat -A PREROUTING -p tcp -d "$LAN" --dport "$RELAY" -j DNAT --to-destination "$LAN":"$ORPORT""${NC}
  echo -e ${CYAN}"iptables -t nat -A OUTPUT -p tcp -d "$WAN" --dport "$RELAY" -j DNAT --to-destination "$LAN":"$ORPORT""${NC}
  echo -e ${CYAN}"iptables -I tobesortedout 5 -i eth0 -p tcp -m tcp --dport "$DIRPORT" --tcp-flags FIN,SYN,RST,ACK SYN -m connlimit --connlimit-above 16 --connlimit-mask 24 -j REJECT --reject-with tcp-reset"${NC}
  echo -e ${CYAN}"iptables -I tobesortedout 6 -i eth0 -p tcp -m tcp --dport "$DIRPORT" -m state --state NEW -m limit --limit 20/sec --limit-burst 40 -j ACCEPT"${NC}
  echo -e ${CYAN}"iptables -t nat -A PREROUTING -p tcp -d "$LAN" --dport "$DIR" -j DNAT --to-destination "$LAN":"$DIRPORT""${NC}
fi
exit 0

Usage: Only numerical input is allowed!
(Don’t choose a port under 20 it will make this script exit.)

## Usage: Only numerical input is allowed!
## Don't choose a port under 20 it will make this script exit.
# Pf.tor.sh "relay" "orport" "dir" "dirport"
# Standalone to see its usage.
./Pf.tor.sh
# Or-port only.
# Therefore only two arguments.
./Pf.tor.sh 443 9001
# Both Or and Dir-port
# Therefore only four arguments.
./Pf.tor.sh 443 9001 80 9030
#

Now about those color definitions used in the script above:
(These start around line 10)

## For these colors to work either keep the next 5 lines.
RED="\033[0;31m"
BLUE="\033[1;34m"
CYAN="\033[1;36m"
YELLOW="\033[1;33m"
NC="\033[0m"              # No Color
#
## OR...
#
## Paste the following lines in your ~/.bashrc file for a more 'global feel'. ; - )
## (At the bottom is recommended.)
## Do uncomment those first before resourcing your ~/.bashrc file. ; - )
## http://tldp.org/LDP/abs/html/sample-bashrc.html
## Define some colors first:
RED="\033[0;31m"
export RED
BLUE="\033[1;34m"
export BLUE
CYAN="\033[1;36m"
export CYAN
YELLOW="\033[1;33m"
export YELLOW
NC="\033[0m"              # No Color
export NC
# --> Nice. Has the same effect as using "ansi.sys" in DOS.
## Don't forget to resource your bashrc file!

This script can easily be edited for other “port-forwarding” purposes of course (Which for now is to set up your iptables to function properly as a Tor Relay only.). And yes, you have to uncomment all featured commands for them to work.

Why? Because scripts that have to be run as root equals writing demos only to me! Or… you can take a look here for a live version. 😉

Please also note the “Pf.tor.sh.txt.asc” file. It means that you can verify that I made this script:

How?

gpg --verify Pf.tor.sh.txt.asc Pf.tor.sh.txt

But remember!
Despite my efforts to code properly!
(When in doubt always shout…) 😆

## What I've written:
## IS PROVIDED "AS IS",
## WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
## INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
## IN NO EVENT SHALL THE AUTHOR(S) OR COPYRIGHT HOLDER(S)
## BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
## WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
## ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
## OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
## For more: http://www.opensource.org/licenses/mit-license.php

See the gallery for a visual representation of the above mentioned script.
(Hiding my internal ip as I did NOT in these pictures, would merely constitute “a security through obscurity” trick.)

For a working example of what one could accomplish with this script, can be seen here.

Also I might or might not enhance my script even further by automatically adding/editing the appropriate stanzas in the ‘torrc‘ file. So one only has to run this script once, restart Tor and then be off with a good start. <– Maybe!?