{"id":154,"date":"2007-06-24T15:17:58","date_gmt":"2007-06-24T22:17:58","guid":{"rendered":"http:\/\/www.stevenbrown.ca\/blog\/archives\/154"},"modified":"2007-11-13T20:47:37","modified_gmt":"2007-11-14T03:47:37","slug":"faking-mac-address-in-linux","status":"publish","type":"post","link":"https:\/\/www.stevenbrown.ca\/blog\/archives\/154","title":{"rendered":"Faking MAC Address in Linux"},"content":{"rendered":"<p>I&#8217;m house-sitting for my brother, and I brought my computer over so I didn&#8217;t die of boredom, alone, in a house for a week.  The problem is the Internet over here is hooked up directly to the modem, and the Internet provider will only provide an Internet address (IP address) to the ethernet card that was registered to them: the one in my brother&#8217;s computer.  So, I turned on the computer, checked out the advanced properties of the ethernet card to get the MAC (physical) address and wrote it down.  In Linux, using <code>ifconfig<\/code>, you can tell a particular interface to pretend its address is something else.  If you&#8217;re using a Debian derivative (I&#8217;m using Ubuntu), you&#8217;ll probably need <code>sudo<\/code> before the command.<\/p>\n<p><strong>Note:<\/strong> Copy your current MAC address and put it somewhere safe, just in case &#8211; I haven&#8217;t tested to see if this is permanent, yet.<\/p>\n<p>On the command line:<\/p>\n<p><code>sudo ifconfig eth0 hw ether  xx:xx:xx:xx:xx:xx<\/code><\/p>\n<p>Or, to make it permanent, put it in <code>\/etc\/network\/interfaces<\/code><\/p>\n<p><code><br \/>\n...<br \/>\nauto eth0<br \/>\niface eth0 inet dhcp<br \/>\n...<br \/>\nhw ether  xx:xx:xx:xx:xx:xx<br \/>\n...<br \/>\n<\/code><\/p>\n<p>If you get an error message, saying the <em>&#8220;Device or Resource is busy&#8221;<\/em> then you probably have to bring the interface down first: <code>sudo ifconfig eth0 down<\/code>.  Use <code>ifconfig eth0<\/code> to check that it worked &#8211; it should show the new address if no error was reported.  Once that was done, I connected my computer to the modem and the provider was much more cooperative with my DHCP requests.  \ud83d\ude00  Yay, Internet on <em>my<\/em> computer again!  \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m house-sitting for my brother, and I brought my computer over so I didn&#8217;t die of boredom, alone, in a house for a week. The problem is the Internet over here is hooked up directly to the modem, and the Internet provider will only provide an Internet address (IP address) to the ethernet card that&hellip; <a class=\"more-link\" href=\"https:\/\/www.stevenbrown.ca\/blog\/archives\/154\">Continue reading <span class=\"screen-reader-text\">Faking MAC Address in Linux<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[3],"tags":[70,42,4],"class_list":["post-154","post","type-post","status-publish","format-standard","hentry","category-geek","tag-admin","tag-how-to","tag-linux","entry"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4jEMb-2u","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.stevenbrown.ca\/blog\/wp-json\/wp\/v2\/posts\/154","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.stevenbrown.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.stevenbrown.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.stevenbrown.ca\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.stevenbrown.ca\/blog\/wp-json\/wp\/v2\/comments?post=154"}],"version-history":[{"count":0,"href":"https:\/\/www.stevenbrown.ca\/blog\/wp-json\/wp\/v2\/posts\/154\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.stevenbrown.ca\/blog\/wp-json\/wp\/v2\/media?parent=154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.stevenbrown.ca\/blog\/wp-json\/wp\/v2\/categories?post=154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.stevenbrown.ca\/blog\/wp-json\/wp\/v2\/tags?post=154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}