user9382: OK, I recently posted trying to get help connecting to BITCOIND using Ubuntu or Windows 7.
In Ubuntu (Virtual Machine under Win7 64bit) 12.04 Desktop LTS I have the following written in my BITCOIN.CONF file located in $HOME/.bitcoin :
server=1
rpcuser=hello1
rpcpassword=12345
rpcallowip=*

I run BITCOIND with following command:
./bitcoind --server --rpcuser=hello1 --rpcpassword=12345

But when I try and connect with the Ruby script (see https://bitcointalk.org/index.php?topic=85495.msg3773215#msg3773215 ) it gives an error saying it can't connect.
Likewise, under Windows 7 I attempt the same procedure and using NIRSOFT cports app I see Bitcoin daemon is only opened under port 8333, not 833*2* as one would expect if RPC connection was active.
I've opened TCP/UDP port 8332-8333 in port forwarding of router.
What on Earth am I doing wrong here? 
Why can't I connect to Bitcoin daemon via RPC? 
==> BONUS QUESTION: I'm quite new to Ubuntu; how do you check open TCP ports at terminal in Ubuntu? (equivalent of netstat in windows)

user-1: Netstat(1) will give you open ports (in this case listening TCP ports): netstat -lnt.
To make sure you know which port your bitcoind daemon is using, start it with paramter -rpcport. In your example, use exactly -rpcport=8332, then use the same port when connecting to it.

user-1: QT's RPC API is set to listen by default to TCP port 8332. 
Take out everything from your bitcoin.conf and leave only:
rpcuser=hello1 
rpcpassword=12345
Since you have specified the rpcuser and rpcpassword parameters in the bitcoin.conf file you don't need to explicitly specify them in the bitcoind initialization command (you will need to send them from your client, once the daemon is up and running). 
In a Command Prompt, run: bitcoind.exe -daemon -debugnet -printtoconsole and then open a new Command Prompt and type: netstat -a, once the RPC API is listening for connections you should see this: TCP  127.0.0.1:8332  myHostName:0  LISTENING
As a note, rpcallowip=* puts your server at risk so I would highly recommend you stop using it immediately.

user10829: I am not familiar about how to run it on windows but for Ubuntu 12.04 I can help you out first you should remove garbage from the conf file which should be located under ~/.bitcoin folder with the name bitcoin.conf with just following text :
server=1
daemon=1
rpcuser=whatever
rpcpassword=whatever

^^ is sufficient 
now to make bitcoind to reply RPC calls you should have jsonRPCClient files in your computer I am not familiar with ruby but still https://github.com/Textalk/json-rpc-client-ruby this link can give you an idea on how to do it. I hope this will help you achieve what you are looking for. And the bonus answer on linux you can use netstat -ntpl to have detailed view on which program is using which port

9382: <p>OK, I recently posted trying to get help connecting to BITCOIND using Ubuntu or Windows 7.</p>

<p>In Ubuntu (Virtual Machine under Win7 64bit) 12.04 Desktop LTS I have the following written in my BITCOIN.CONF file located in $HOME/.bitcoin :</p>

<pre><code>server=1
rpcuser=hello1
rpcpassword=12345
rpcallowip=*
</code></pre>

<p>I run BITCOIND with following command:</p>

<pre><code>./bitcoind --server --rpcuser=hello1 --rpcpassword=12345
</code></pre>

<p>But when I try and connect with the Ruby script (see <a href="https://bitcointalk.org/index.php?topic=85495.msg3773215#msg3773215" rel="nofollow">https://bitcointalk.org/index.php?topic=85495.msg3773215#msg3773215</a> ) it gives an error saying it can't connect.</p>

<p>Likewise, under Windows 7 I attempt the same procedure and using NIRSOFT cports app I see Bitcoin daemon is only opened under port 8333, not 833*<em>2</em>* as one would expect if RPC connection was active.</p>

<p>I've opened TCP/UDP port 8332-8333 in port forwarding of router.</p>

<p>What on Earth am I doing wrong here? 
<strong>Why can't I connect to Bitcoin daemon via RPC?</strong> </p>

<p>==> <strong>BONUS QUESTION:</strong> I'm quite new to Ubuntu; how do you check open TCP ports at terminal in Ubuntu? (equivalent of netstat in windows)</p>
 -1: <p>Netstat(1) will give you open ports (in this case listening TCP ports): <code>netstat -lnt</code>.</p>

<p>To make sure you know which port your bitcoind daemon is using, start it with paramter <code>-rpcport</code>. In your example, use exactly <code>-rpcport=8332</code>, then use the same port when connecting to it.</p>
 -1: <p>QT's RPC API is set to listen by default to TCP port 8332. </p>

<p>Take out everything from your <strong>bitcoin.conf</strong> and leave only:
rpcuser=hello1 
rpcpassword=12345</p>

<p>Since you have specified the <strong>rpcuser</strong> and <strong>rpcpassword</strong> parameters in the bitcoin.conf file you don't need to explicitly specify them in the bitcoind initialization command (you will need to send them from your client, once the daemon is up and running). </p>

<p>In a Command Prompt, run: <strong>bitcoind.exe -daemon -debugnet -printtoconsole</strong> and then open a new Command Prompt and type: <strong>netstat -a</strong>, once the RPC API is listening for connections you should see this: <strong>TCP  127.0.0.1:8332  myHostName:0  LISTENING</strong></p>

<p>As a note, <strong>rpcallowip=*</strong> puts your server at risk so I would highly recommend you stop using it immediately.</p>
 10829: <p>I am not familiar about how to run it on windows but for Ubuntu 12.04 I can help you out first you should remove garbage from the conf file which should be located under ~/.bitcoin folder with the name bitcoin.conf with just following text :</p>

<pre><code>server=1
daemon=1
rpcuser=whatever
rpcpassword=whatever
</code></pre>

<p>^^ is sufficient </p>

<p>now to make bitcoind to reply RPC calls you should have jsonRPCClient files in your computer I am not familiar with ruby but still <a href="https://github.com/Textalk/json-rpc-client-ruby" rel="nofollow">https://github.com/Textalk/json-rpc-client-ruby</a> this link can give you an idea on how to do it. I hope this will help you achieve what you are looking for. And the bonus answer on linux you can use netstat -ntpl to have detailed view on which program is using which port</p>
