'ifconfig eth0 up' does not restore connection












-1














(I am running Kali (Debian) on a VM.)



I had been experiencing problems with changing my computer's MAC address, as whenever i try:



root@kali:~# macchanger -r eth0
Current MAC: 08:00:27:3b:23:a1 (CADMUS COMPUTER SYSTEMS)
Permanent MAC: 08:00:27:3b:23:a1 (CADMUS COMPUTER SYSTEMS)
[ERROR] Could not change MAC: interface up or insufficient permissions: Device or resource busy.


I then fixed this by using the following commands:



sudo -i
ifconfig eth0 down
macchanger -r eth0
ifconfig eth0 up


Only, whenever i type the last command, ifconfig eth0 up , my connection is still lost. I cant connect to Internet, cant ping any servers or anything of the sort.



Edit: Using the Adapter Type 'Intel PRO/1000 MT Desktop' allows me to change my MAC address without having to use any other commands, however, when it is set that way, i also have no connection. (Which is why I am currently using the Adapter Type 'PCnet-FAST-III' attached to 'Bridged Adapter')










share|improve this question
























  • Seems like you have to run dhclient -v -r eth0 && dhclient -v eth0
    – Valentin Bajrami
    Jul 21 '17 at 7:12










  • Given that this is stuff that is explicitly called out, with emphasis, in Arch doco, I am saddened to see that people think that this is an "unclear or not useful" question for a Debian user to ask.
    – JdeBP
    Jul 21 '17 at 8:05










  • often it takes a while for picking up the new MAC...
    – Rui F Ribeiro
    Jul 21 '17 at 8:43










  • run ifconfig eth0 to check if changes are aproved to interface, and ping your gateway ip to test if interface is working correctly.
    – Krzysztof Stasiak
    Jul 21 '17 at 9:39










  • try systemctl restart networking
    – Bob Johnson
    Dec 16 at 6:29
















-1














(I am running Kali (Debian) on a VM.)



I had been experiencing problems with changing my computer's MAC address, as whenever i try:



root@kali:~# macchanger -r eth0
Current MAC: 08:00:27:3b:23:a1 (CADMUS COMPUTER SYSTEMS)
Permanent MAC: 08:00:27:3b:23:a1 (CADMUS COMPUTER SYSTEMS)
[ERROR] Could not change MAC: interface up or insufficient permissions: Device or resource busy.


I then fixed this by using the following commands:



sudo -i
ifconfig eth0 down
macchanger -r eth0
ifconfig eth0 up


Only, whenever i type the last command, ifconfig eth0 up , my connection is still lost. I cant connect to Internet, cant ping any servers or anything of the sort.



Edit: Using the Adapter Type 'Intel PRO/1000 MT Desktop' allows me to change my MAC address without having to use any other commands, however, when it is set that way, i also have no connection. (Which is why I am currently using the Adapter Type 'PCnet-FAST-III' attached to 'Bridged Adapter')










share|improve this question
























  • Seems like you have to run dhclient -v -r eth0 && dhclient -v eth0
    – Valentin Bajrami
    Jul 21 '17 at 7:12










  • Given that this is stuff that is explicitly called out, with emphasis, in Arch doco, I am saddened to see that people think that this is an "unclear or not useful" question for a Debian user to ask.
    – JdeBP
    Jul 21 '17 at 8:05










  • often it takes a while for picking up the new MAC...
    – Rui F Ribeiro
    Jul 21 '17 at 8:43










  • run ifconfig eth0 to check if changes are aproved to interface, and ping your gateway ip to test if interface is working correctly.
    – Krzysztof Stasiak
    Jul 21 '17 at 9:39










  • try systemctl restart networking
    – Bob Johnson
    Dec 16 at 6:29














-1












-1








-1







(I am running Kali (Debian) on a VM.)



I had been experiencing problems with changing my computer's MAC address, as whenever i try:



root@kali:~# macchanger -r eth0
Current MAC: 08:00:27:3b:23:a1 (CADMUS COMPUTER SYSTEMS)
Permanent MAC: 08:00:27:3b:23:a1 (CADMUS COMPUTER SYSTEMS)
[ERROR] Could not change MAC: interface up or insufficient permissions: Device or resource busy.


I then fixed this by using the following commands:



sudo -i
ifconfig eth0 down
macchanger -r eth0
ifconfig eth0 up


Only, whenever i type the last command, ifconfig eth0 up , my connection is still lost. I cant connect to Internet, cant ping any servers or anything of the sort.



Edit: Using the Adapter Type 'Intel PRO/1000 MT Desktop' allows me to change my MAC address without having to use any other commands, however, when it is set that way, i also have no connection. (Which is why I am currently using the Adapter Type 'PCnet-FAST-III' attached to 'Bridged Adapter')










share|improve this question















(I am running Kali (Debian) on a VM.)



I had been experiencing problems with changing my computer's MAC address, as whenever i try:



root@kali:~# macchanger -r eth0
Current MAC: 08:00:27:3b:23:a1 (CADMUS COMPUTER SYSTEMS)
Permanent MAC: 08:00:27:3b:23:a1 (CADMUS COMPUTER SYSTEMS)
[ERROR] Could not change MAC: interface up or insufficient permissions: Device or resource busy.


I then fixed this by using the following commands:



sudo -i
ifconfig eth0 down
macchanger -r eth0
ifconfig eth0 up


Only, whenever i type the last command, ifconfig eth0 up , my connection is still lost. I cant connect to Internet, cant ping any servers or anything of the sort.



Edit: Using the Adapter Type 'Intel PRO/1000 MT Desktop' allows me to change my MAC address without having to use any other commands, however, when it is set that way, i also have no connection. (Which is why I am currently using the Adapter Type 'PCnet-FAST-III' attached to 'Bridged Adapter')







debian kali-linux






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 16 at 4:22









Rui F Ribeiro

38.9k1479129




38.9k1479129










asked Jul 21 '17 at 7:02









ark.pytm

1




1












  • Seems like you have to run dhclient -v -r eth0 && dhclient -v eth0
    – Valentin Bajrami
    Jul 21 '17 at 7:12










  • Given that this is stuff that is explicitly called out, with emphasis, in Arch doco, I am saddened to see that people think that this is an "unclear or not useful" question for a Debian user to ask.
    – JdeBP
    Jul 21 '17 at 8:05










  • often it takes a while for picking up the new MAC...
    – Rui F Ribeiro
    Jul 21 '17 at 8:43










  • run ifconfig eth0 to check if changes are aproved to interface, and ping your gateway ip to test if interface is working correctly.
    – Krzysztof Stasiak
    Jul 21 '17 at 9:39










  • try systemctl restart networking
    – Bob Johnson
    Dec 16 at 6:29


















  • Seems like you have to run dhclient -v -r eth0 && dhclient -v eth0
    – Valentin Bajrami
    Jul 21 '17 at 7:12










  • Given that this is stuff that is explicitly called out, with emphasis, in Arch doco, I am saddened to see that people think that this is an "unclear or not useful" question for a Debian user to ask.
    – JdeBP
    Jul 21 '17 at 8:05










  • often it takes a while for picking up the new MAC...
    – Rui F Ribeiro
    Jul 21 '17 at 8:43










  • run ifconfig eth0 to check if changes are aproved to interface, and ping your gateway ip to test if interface is working correctly.
    – Krzysztof Stasiak
    Jul 21 '17 at 9:39










  • try systemctl restart networking
    – Bob Johnson
    Dec 16 at 6:29
















Seems like you have to run dhclient -v -r eth0 && dhclient -v eth0
– Valentin Bajrami
Jul 21 '17 at 7:12




Seems like you have to run dhclient -v -r eth0 && dhclient -v eth0
– Valentin Bajrami
Jul 21 '17 at 7:12












Given that this is stuff that is explicitly called out, with emphasis, in Arch doco, I am saddened to see that people think that this is an "unclear or not useful" question for a Debian user to ask.
– JdeBP
Jul 21 '17 at 8:05




Given that this is stuff that is explicitly called out, with emphasis, in Arch doco, I am saddened to see that people think that this is an "unclear or not useful" question for a Debian user to ask.
– JdeBP
Jul 21 '17 at 8:05












often it takes a while for picking up the new MAC...
– Rui F Ribeiro
Jul 21 '17 at 8:43




often it takes a while for picking up the new MAC...
– Rui F Ribeiro
Jul 21 '17 at 8:43












run ifconfig eth0 to check if changes are aproved to interface, and ping your gateway ip to test if interface is working correctly.
– Krzysztof Stasiak
Jul 21 '17 at 9:39




run ifconfig eth0 to check if changes are aproved to interface, and ping your gateway ip to test if interface is working correctly.
– Krzysztof Stasiak
Jul 21 '17 at 9:39












try systemctl restart networking
– Bob Johnson
Dec 16 at 6:29




try systemctl restart networking
– Bob Johnson
Dec 16 at 6:29










2 Answers
2






active

oldest

votes


















0














It is possible that you're just not picking up an IP address, because your DHCP client is not running or needs to be told that there is a new MAC address or needs to be restarted after a MAC address change.



On my machine I would try running dhcpcd -t 10 eth0 to start up a DHCP client but this is not a Debian machine. Debian on-line manuals indicate that on Debian 9 the command is instead named dhcpcd5 or dhclient.






share|improve this answer































    0














    I guess this will be an answer as I answered the initial question I had,
    I finally got internet connectivity to finally work while using Adapter Type 'Intel PRO/1000 MT Desktop', what I had to do was go into crontab -e
    and remove the command @reboot macchanger -r eth0 as I found out whenever I try changing the MAC address, its the cause of the internet losing connectivity. I am pretty sure using dhclient -v -r eth0 && dhclient -v eth0 did help, as i previously did remove @reboot macchanger -r eth0 from crontab earlier with no effect.






    share|improve this answer





















      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "106"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f379888%2fifconfig-eth0-up-does-not-restore-connection%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      It is possible that you're just not picking up an IP address, because your DHCP client is not running or needs to be told that there is a new MAC address or needs to be restarted after a MAC address change.



      On my machine I would try running dhcpcd -t 10 eth0 to start up a DHCP client but this is not a Debian machine. Debian on-line manuals indicate that on Debian 9 the command is instead named dhcpcd5 or dhclient.






      share|improve this answer




























        0














        It is possible that you're just not picking up an IP address, because your DHCP client is not running or needs to be told that there is a new MAC address or needs to be restarted after a MAC address change.



        On my machine I would try running dhcpcd -t 10 eth0 to start up a DHCP client but this is not a Debian machine. Debian on-line manuals indicate that on Debian 9 the command is instead named dhcpcd5 or dhclient.






        share|improve this answer


























          0












          0








          0






          It is possible that you're just not picking up an IP address, because your DHCP client is not running or needs to be told that there is a new MAC address or needs to be restarted after a MAC address change.



          On my machine I would try running dhcpcd -t 10 eth0 to start up a DHCP client but this is not a Debian machine. Debian on-line manuals indicate that on Debian 9 the command is instead named dhcpcd5 or dhclient.






          share|improve this answer














          It is possible that you're just not picking up an IP address, because your DHCP client is not running or needs to be told that there is a new MAC address or needs to be restarted after a MAC address change.



          On my machine I would try running dhcpcd -t 10 eth0 to start up a DHCP client but this is not a Debian machine. Debian on-line manuals indicate that on Debian 9 the command is instead named dhcpcd5 or dhclient.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jul 21 '17 at 7:51









          JdeBP

          33.2k468156




          33.2k468156










          answered Jul 21 '17 at 7:11









          mdeanda

          111




          111

























              0














              I guess this will be an answer as I answered the initial question I had,
              I finally got internet connectivity to finally work while using Adapter Type 'Intel PRO/1000 MT Desktop', what I had to do was go into crontab -e
              and remove the command @reboot macchanger -r eth0 as I found out whenever I try changing the MAC address, its the cause of the internet losing connectivity. I am pretty sure using dhclient -v -r eth0 && dhclient -v eth0 did help, as i previously did remove @reboot macchanger -r eth0 from crontab earlier with no effect.






              share|improve this answer


























                0














                I guess this will be an answer as I answered the initial question I had,
                I finally got internet connectivity to finally work while using Adapter Type 'Intel PRO/1000 MT Desktop', what I had to do was go into crontab -e
                and remove the command @reboot macchanger -r eth0 as I found out whenever I try changing the MAC address, its the cause of the internet losing connectivity. I am pretty sure using dhclient -v -r eth0 && dhclient -v eth0 did help, as i previously did remove @reboot macchanger -r eth0 from crontab earlier with no effect.






                share|improve this answer
























                  0












                  0








                  0






                  I guess this will be an answer as I answered the initial question I had,
                  I finally got internet connectivity to finally work while using Adapter Type 'Intel PRO/1000 MT Desktop', what I had to do was go into crontab -e
                  and remove the command @reboot macchanger -r eth0 as I found out whenever I try changing the MAC address, its the cause of the internet losing connectivity. I am pretty sure using dhclient -v -r eth0 && dhclient -v eth0 did help, as i previously did remove @reboot macchanger -r eth0 from crontab earlier with no effect.






                  share|improve this answer












                  I guess this will be an answer as I answered the initial question I had,
                  I finally got internet connectivity to finally work while using Adapter Type 'Intel PRO/1000 MT Desktop', what I had to do was go into crontab -e
                  and remove the command @reboot macchanger -r eth0 as I found out whenever I try changing the MAC address, its the cause of the internet losing connectivity. I am pretty sure using dhclient -v -r eth0 && dhclient -v eth0 did help, as i previously did remove @reboot macchanger -r eth0 from crontab earlier with no effect.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jul 21 '17 at 17:18









                  ark.pytm

                  1




                  1






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Unix & Linux Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.





                      Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                      Please pay close attention to the following guidance:


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f379888%2fifconfig-eth0-up-does-not-restore-connection%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Morgemoulin

                      Scott Moir

                      Souastre