How do you change MAC Address?

Ever wanted to get a permanent solution for your mac address change? Most of you who use internet via LAN has this problem of setting the mac address from the commandline. You do it every single time 3/4 console commands to get the net ready to use in your Ubuntu. Now go make a file(macset) at your home with any texteditor where u’ll have the following lines. notice 22:11:2F:3B:C5:54 is the Mac address of your LAN. It will vary upon your ISP/local provider. Just write down your own mac there. now do
sudo chmod 0777 macset

on the file and when you turn on your pc

you just type

sudo ./macset

to run your file’s commands as shell script, et voila! 🙂

ifconfig eth0 down
ifconfig eth0 hw ether 22:11:2F:3B:C5:54
ifconfig eth0 up
/etc/init.d/networking restart

You can now check if your MAC has been set properly by applying the follwing command at command line

ifconfig | grep HWaddr

Also read this post


An Alternative proxy script to host your WordprssBlog anywhere else

Months ago renowend PHP programmer Hasin Hayder posted a nifty thing of only 10 line proxy. Now this code had been written by Ferdous just after that post had been made. I am using this code to host my blog temporarily. But I felt the need for blogging about it which might help many programmers to better understand the technics. Definitely Hasin bhai’s technic is on the top. But we had a thought in mind that Regular Expressions are a bit costly and on a Conversation with him on Gtalk he said if you can make an alternative to this not using regular expression I am gonna treat you 😛  So, you know this is done for the challenge as well. 😀 Comparing the time of execution it yeilded a bit slower than Hasin bhai’s script. I have added the main proxy syntax highlighted here.

Remember, you need the .htaccess file with this to make it work. Go get the code from Hasin bhai’s original post 🙂

< ?php
    $primary_url=""; //original url of your wordpress blog
    $secondary_url=''; //here the new hosted url should be specified
    $path =array_keys($_GET);
    $data_url = (!empty($path[0]))?$primary_url."/".$path[0]:$primary_url;
    $doc=new domdocument('1.0','UTF-8');
    $data = $doc->saveHTML();
    foreach($tags as $tag){
        $href = $tag->getAttribute('href');
        $href_new = str_replace($primary_url, "$secondary_url", $href);
        $data = str_replace($href,$href_new,$data);

    foreach($form_tags as $tag){
        $action = $tag->getAttribute('action');
        $action_new = str_replace($primary_url, "$secondary_url", $action);
        $data = str_replace($action,$action_new,$data);
    echo $data;

Now Your .htaccess file need to have the following codes:

RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{QUERY_STRING} (.+)
RewriteRule ^(.*)$ index.php?$1&%{QUERY_STRING}

RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1

৩০০ টাকায় ডোমেইন নেম কিনুন

হ্যাঁ, সত্যি!

কোনো গালগল্প নয়, কোনো প্রলোভন নয়। আপনি মাত্র ৩০০টাকা দিয়েই হতে পারেন একটি এ জাতীয় নাম।
(.com, .net, .org, .biz, .info, .us) এই টাইপ যেকোনোটি।

এতে কোনো টাইপ সুবিধা কম থাকবেনা। তবে ৩০০টাকা হচ্ছে প্রথম বছরের জন্য। পরবর্তী বছরের জন্য এর মূল্য বাড়বে।

বিশেষত্ব: কন্ট্রোল প্যানেল, সম্পূর্ণ আপনার নিয়ন্ত্রণে, ডিএনএস ম্যানেজমেন্ট, ডোমেইন ফরোয়ার্ডিং ইত্যাদি সুবিধাযুক্ত।

কোথায় পাবেন: কল করুন আমাকে – ০১৯১২ ০২৪৬৯৯ অথবা জানুন এখান থেকে