## Installing Ipython Notebook on Ubuntu 12

I ran into a series of errors and finally managed to make Ipython run on my Ubuntu 12. Notice I am adding some extra stuff in terms of mathjax and pandoc but that is just for a smoother install. Note the trouble point was the package pyzmq but it was troubleshooted by both the –upgrade option as well as the installing of python-dev

sudo apt-get install python-pip
sudo apt-get install python-dev

sudo pip install invoke
sudo pip install jinja2
sudo pip install --upgrade pyzmq

sudo python -m IPython.external.mathjax
sudo apt-get install pandoc

ipython notebook



Sources-

## Running R GUI on Google Compute

I wanted to run R GUIs ( rattle, Rcmdr, Deducer) on my Google Compute Instance, but didnt know how to figure out how to enable x11.

Initially I just tried to enable x11 forwarding in the local ssh (Ubuntu) and remote sshd( GCE), but it still needed some more.

Note I use gedit to edit files locally ( since it is easier) and vi to edit files remotely ( because I didnt have a graphical environment there yet) . I used vi help from the link here  (basically sudo vi filename opens the file in Linux, you scroll down and press Insert to write your changes, then hit escape, then write this to save and quit :qw ( or :q! to NOT save and quit), your mouse is quite useless and the arrow keys dont help much in vi- I assure you that)

[local]
/etc/ssh_config or ~/.ssh/config
ForwardX11 yes

restarted local ssh

[remote]
/etc/sshd_config
X11Forwarding yes

restarted remote sshd

Well this is how it is done- following is a copy and paste from actual discussion-

here are two steps you have to do in order to run X-windows applications on your instance.

1) You have to install some X-windows applications on your instance.  I used the command
sudo apt-get install xterm
which works on Ubuntu.  On Centos, you would use the command
yum install xterm
but I didn’t test that.
2) You have to create an X-windows tunnel through SSH.  You do that with the -X switch to the gcutil ssh command:
gcutil ssh –ssh_arg -X INSTANCE
When you login to the instance, verify that the tunnel is in place.
$rman@test-pd:~$ echo $DISPLAY localhost:10.0 rman@test-pd:~$
By way of contrast, this is what it looks like if the tunnel didn’t work:
rman@test-pd:~$echo$DISPLAY
rman@test-pd:~$Hat Tip- gce discussion group on google groups https://groups.google.com/forum/#!forum/gce-discussion and Jeff Silverman from the GCE team. ## Modifying Sources File in Linux for Monet DB Installation If you like me are a Linux newbie, the following helps in modifying the source file . i.e for adding in sources for Monet DB installation sudo sh -c ‘echo “deb http://dev.monetdb.org/downloads/deb/ precise monetdb” > /etc/apt/sources.list.d/monetdb.list’ sudo sh -c ‘echo “deb-src http://dev.monetdb.org/downloads/deb/ precise monetdb” > /etc/apt/sources.list.d/monetdb.list’ ps- I was on Google compute/ Linux ## Cyber Cold War I try to write on cyber conflict without getting into the politics of why someone is hacking someone else. I always get beaten by someone in the comments thread when I write on politics. But recent events have forced me to update my usual “how-to” cyber conflict to “why” cyber conflict. This is because of a terrorist attack in my hometown Delhi. (updated- http://www.nytimes.com/2012/02/14/world/middleeast/israeli-embassy-officials-attacked-in-india-and-georgia.html?_r=1&hp Iran allegedly tried (as per Israel) to assassinate the wife of Israeli Defence Attache in Delhi using a magnetic bomb, India as she went to school to pick up her kids, somebody else put a grenade in Israeli embassy car in Georgia which was found in time. Based on reports , initial work suggests the bomb was much more sophisticated than local terrorists, but the terrorists seemed to have some local recce work done. India has 0 history of antisemitism but this is the second time Israelis have been targeted since 26/11 Mumbai attacks. India buys 12 % of oil annually from Iran (and refuses to join the oil embargo called by US and Europe) Cyber Conflict is less painful than conflict, which is inevitable as long as mankind exists. Also the Western hemisphere needs a moon shot (cyber conflict could be the Sputnik like moment) and with declining and aging populations but better technology, Western Hemisphere govts need cyber conflict as they are running out of humans to fight their wars. Eastern govt. are even more obnoxious in using children for conflict propaganda, and corruption. Last week CIA.gov website went down This week Iranian govt is allegedly blocking https traffic on eve of Annual Revolution Day (what a coincidence!) Some resources to help Internet users in Iran (or maybe this could be a dummy test for the big one – hacking the great firewall of China) News from Hacker News- http://news.ycombinator.com/item?id=3575029 I’m writing this to report the serious troubles we have regarding accessing Internet in Iran at the moment. Since Thursday Iranian government has shutted down the https protocol which has caused almost all google services (gmail, and google.com itself) to become inaccessible. Almost all websites that reply on Google APIs (like wolfram alpha) won’t work. Accessing to any website that replies on https (just imaging how many websites use this protocol, from Arch Wiki to bank websites). Also accessing many proxies is also impossible. There are almost no official reports on this and with many websites and my email accounts restricted I can just confirm this based on my own and friends experience. I have just found one report here: Iran Shut Down Gmail , Google , Yahoo and sites using “Https” Protocol The reason for this horrible shutdown is that the Iranian regime celebrates 1979 Islamic revolution tomorrow. I just wanted to let you guys know about this. If you have any solution regarding bypassing this restriction please help! The boys at Tor think they can help- but its not so elegant, as I prefer creating a batch file rather than explain coding to newbies. this is still getting to better and easier interfaces https://www.torproject.org/projects/obfsproxy-instructions.html.en # Obfsproxy Instructions ### Step 1: Install dependencies, obfsproxy, and Tor You will need a C compiler (gcc), the autoconf and autotools build system, the git revision control system, pkg-config andlibtoollibevent-2 and its headers, and the development headers of OpenSSL. On Debian testing or Ubuntu oneiric, you could do: # apt-get install autoconf autotools-dev gcc git pkg-config libtool libevent-2.0-5 libevent-dev libevent-openssl-2.0-5 libssl-dev If you’re on a more stable Linux, you can either try our experimental backport libevent2 debs or build libevent2 from source. Clone obfsproxy from its git repository:$ git clone https://git.torproject.org/obfsproxy.git
The above command should create and populate a directory named ‘obfsproxy’ in your current directory.

Compile obfsproxy:
$cd obfsproxy$ ./autogen.sh && ./configure && make

Optionally, as root install obfsproxy in your system:
# make install

If you prefer not to install obfsproxy as root, you can instead just modify the Transport lines in your torrc file (explained below) to point to your obfsproxy binary.

You will need Tor 0.2.3.11-alpha or later.

### Step 2a: If you’re the client…

First, you need to learn the address of a bridge that supports obfsproxy. If you don’t know any, try asking a friend to set one up for you. Then the appropriate lines to your tor configuration file:

UseBridges 1
Bridge obfs2 128.31.0.34:1051
ClientTransportPlugin obfs2 exec /usr/local/bin/obfsproxy --managed

Don’t forget to replace 128.31.0.34:1051 with the IP address and port that the bridge’s obfsproxy is listening on.
Congratulations! Your traffic should now be obfuscated by obfsproxy. You are done! You can now start using Tor.

For old fashioned tunnel creation under Seas of English Channel-

http://dag.wieers.com/howto/ssh-http-tunneling/

Tunneling SSH over HTTP(S)
This document explains how to set up an Apache server and SSH client to allow tunneling SSH over HTTP(S). This can be useful on restricted networks that either firewall everything except HTTP traffic (tcp/80,tcp/443) or require users to use a local (HTTP) proxy.
A lot of people asked why doing it like this if you can just make sshd listen on port 443. Well, that might work if your environment is not hardened like I have seen at several companies, but this setup has a few advantages.

• You can proxy to anywhere (see the Proxy directive in Apache) based on names
• You can proxy to any port you like (see the AllowCONNECT directive in Apache)
• It works even when there is a layer-7 protocol firewall
• If you enable proxytunnel ssl support, it is indistinguishable from real SSL traffic
• You can come up with nice hostnames like ‘downloads.yourdomain.com’ and ‘pictures.yourdomain.com’ and for normal users these will look like normal websites when visited.
• There are many possibilities for doing authentication further along the path
• You can do proxy-bouncing to the n-th degree to mask where you’re coming from or going to (however this requires more changes to proxytunnel, currently I only added support for one remote proxy)
• You do not have to dedicate an IP-address for sshd, you can still run an HTTPS site

Related-

http://opensourceandhackystuff.blogspot.in/2012/02/captive-portal-security-part-1.html

and some crypto for young people

Me- What am I doing about it? I am just writing poems on hacking at http://poemsforkush.com

## Using Two Operating Systems for RATTLE, #Rstats Data Mining GUI

Using a virtual partition is slightly better than using a dual boot system. That is because you can keep the specialized operating system (usually Linux) within the main operating system (usually Windows), browse and alternate between the two operating system just using a simple command, and can utilize the advantages of both operating system.

Also you can create project specific discs for enhanced security.

In my (limited ) Mac experience, the comparisons of each operating system are-

1) Mac-  Both robust and aesthetically designed OS, the higher price and hardware-lockin for Mac remains a disadvantage. Also many stats and analytical software just wont work on the Mac

2) Windows- It is cheaper than Mac and easier to use than Linux. Also has the most compatibility with applications (usually when not crashing)

3) Linux- The lightest and most customized software in the OS class, free to use, and has many lite versions for newbies. Not compatible with mainstream corporate IT infrastructure as of 2011.