Recent posts


Goodbye proxychains !

Posted on 18 Feb 2015

I have this weird, not so straight mechanism to use Internet. I have a server in the Internet/Cloud that I am almost always logged in. I use this server to create a SOCKS proxy on my local and then use Internet via this SOCKS proxy. And then I would use proxychains or proxychains-ng or tsocks with each of the program I want to use Internet for. This is a bit messy setup but somehow I make everything work by using these combination of tools. These tools help resolve the DNS requests made by the program on the remote because my local DNS server doesn’t resolve DNS requests pertaining to Internet. Recently I found a wonderful tool i.e sshuttle, this tool would dynamically change your iptables and would make your computer access Internet if you have a setup like me, i.e you have a server in the Internet and you want to use Internet via this server on your local computer. You would then set your computer to use no proxy and it works because it has changed your iptables, all your packets, DNS requests are being routed through the server and your application doesn’t even know about what’s going on...

Read more...

Transforming Control flow to Data flow

Posted on 13 Feb 2015

This is in continuation to my earlier introductory post on Spatial Computing project I have been working on. I spent my last few days transforming the traditional control flow of the programs into a data flow graph having producer consumer relationship between the instructions. As mentioned in my previous post, this data flow when executed on a data flow architecture that we have been trying to build for ASICs and then later for general purpose computers would be using the highest level of parallelism available because of the producer-consumer relationship between the instructions. There are some programming constructs which are hard to transform from sequential to data flow. Loops, pointers, pointers to functions are some of them that needs extensive care. This post is more about the results from my project. I will be showing the transformation for single loop just for the sake of simplicity : Sample Code int sum_single_loop (int a){ int sum = 0; for (int i = 0; i < a; i++) sum = sum + i; } I am making use of LLVM IR format, so I convert all the code in imperative languages which are having their LLVM front-end avilable, to LLVM IR format....

Read more...

Libreoffice headless comes to the rescue

Posted on 03 Feb 2015

During exam time, I often have to read a lot of .ppt files provided to me by our instructors. That’s what we are supposed to study so that sylabii can be revised quickly. I don’t use windows at all and hence have to use libreoffice for opening these presentation files but libreoffice is quite slow for me as compared to microsoft powerpoint. I don’t want to install Windows now just because of this purpose. However, I observed that pdfs can be opened comparitively faster than these .ppt files. Converting each ppt file to its pdf equivalent is a cumbersome task. Last week, I wanted to convert a bulk of .ppt files to their pdf equivalents and this is where Libreoffice headless came to my rescue, it helped me do a mass conversion with this following command : libreoffice --headless --convert-to pdf *.ppt This will convert all the ppt files in current directory to their pdf equivalents. If you don’t know what a headless means, it means that you don’t want the whole GUI thing to woke up and do stuff for you, that increases the performance by several folds such as in this case. We just want the conversion feature...

Read more...

Enabling user homedirs on Apache

Posted on 03 Feb 2015

In this I will be talking about enabling user home directories for user accounts on the server. I will talking specifically about CentOS since it is this OS that I am using on one of the server I am handling. As usual, we have to tweak little bit with selinux variables here as if your selinux is on, it will prevent apache from accessing user home directories, but first of all you need to enable the homedirs in apache configuration itself. Depending on your OS, apache configuration file name maybe different. In CentOS, following is the apache configuration file : /etc/httpd/conf/httpd.conf You need to look for mod_userdir.c ifmodule block and then comment the line that says UserDir disabled and make sure that line UserDir public_html is uncommented. You can rename this from public_html to any directory name you like but then make sure that your users have that same directory name in their home directory. You also need to restart the httpd server after this. Here it goes : sudo service httpd restart After this you need a selinux rule here, you need to allow userdir from selinux. sudo setsebool -P httpd_enable_homedirs true And there you go, usernames on the...

Read more...

Setting up a mail server the easy way

Posted on 02 Feb 2015

For past few years, I have been managing the whole server at GLUG-NITH. I installed various servers on that machine since it was the first server I got my hands to. I tried whole lot of stuff until one day the SAN space crashed and we had to start from scratch again. We also had a mail server and it was very urgent to up this since leaving the mail server in that inconsistent state would mean a lot bounced mails. We had full fledged mail server previous time consisting of postfix and dovecot. I used a roundcubemail as frontend as it had a nice UI. But there was a major security concern with this, the sysadmin having root access can always see the emails of the members who are given the email address associated with the server. This time, I thought of taking care of this major security concern and scrap the whole idea of storing mails on the server. Instead, we can just use postfix to receive the mail and forward it to the alias that the user provides. Eg: if you are sending email to abc@glug.nith.ac.in, and the alias for abc is set to jkl@gmail.com, then as...

Read more...