DHCP working but clients don't have internet












1















Just as the title says. My DHCP assigns IP addresse and all that stuff to clients; however clients don't have access to the Internet. Here's my DHCP configuration:



ddns-update-style none;
option domain-name "home.lan";
option domain-name-servers 8.8.8.8, 8.8.4.4;
default-lease-time 600;
max-lease-time 7200;
option broadcast-address 10.8.8.255;
subnet 10.8.8.0 netmask 255.255.255.0 {
range 10.8.8.5 10.8.8.9;
option routers 10.8.8.1;
}
broadcast-address 10.8.8.255


I have of course added INTERFACES="eth0" in /etc/default/isc-dhcp-server
and added eth0 interface definition to /etc/network/interfaces



auto eth0
iface eth0 inet static
address 10.8.8.1
netmask 255.255.255.0
gateway 10.8.8.1
broadcast 10.8.8.255


I've added net.ipv4.ip_forward=1 in /etc/sysctl.conf



On the net, I've read that it is possible to simply share the net using linux GUI.
(here's easy guide with screenshots on how to share the connection)
But it doesn't work in my case. If I change on my wlan0 (auto DHCP) to (share to other computers) I don't have internet access after rebooting because wlan0 do not automatically get connection info.



Clients receive IP, default gateway, DNS'es, netmask and so.
Mind any of u helping me with finding out, why it is not working?
Im using ubuntu 12.04. Thanks.










share|improve this question
















bumped to the homepage by Community 21 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.




















    1















    Just as the title says. My DHCP assigns IP addresse and all that stuff to clients; however clients don't have access to the Internet. Here's my DHCP configuration:



    ddns-update-style none;
    option domain-name "home.lan";
    option domain-name-servers 8.8.8.8, 8.8.4.4;
    default-lease-time 600;
    max-lease-time 7200;
    option broadcast-address 10.8.8.255;
    subnet 10.8.8.0 netmask 255.255.255.0 {
    range 10.8.8.5 10.8.8.9;
    option routers 10.8.8.1;
    }
    broadcast-address 10.8.8.255


    I have of course added INTERFACES="eth0" in /etc/default/isc-dhcp-server
    and added eth0 interface definition to /etc/network/interfaces



    auto eth0
    iface eth0 inet static
    address 10.8.8.1
    netmask 255.255.255.0
    gateway 10.8.8.1
    broadcast 10.8.8.255


    I've added net.ipv4.ip_forward=1 in /etc/sysctl.conf



    On the net, I've read that it is possible to simply share the net using linux GUI.
    (here's easy guide with screenshots on how to share the connection)
    But it doesn't work in my case. If I change on my wlan0 (auto DHCP) to (share to other computers) I don't have internet access after rebooting because wlan0 do not automatically get connection info.



    Clients receive IP, default gateway, DNS'es, netmask and so.
    Mind any of u helping me with finding out, why it is not working?
    Im using ubuntu 12.04. Thanks.










    share|improve this question
















    bumped to the homepage by Community 21 mins ago


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.


















      1












      1








      1








      Just as the title says. My DHCP assigns IP addresse and all that stuff to clients; however clients don't have access to the Internet. Here's my DHCP configuration:



      ddns-update-style none;
      option domain-name "home.lan";
      option domain-name-servers 8.8.8.8, 8.8.4.4;
      default-lease-time 600;
      max-lease-time 7200;
      option broadcast-address 10.8.8.255;
      subnet 10.8.8.0 netmask 255.255.255.0 {
      range 10.8.8.5 10.8.8.9;
      option routers 10.8.8.1;
      }
      broadcast-address 10.8.8.255


      I have of course added INTERFACES="eth0" in /etc/default/isc-dhcp-server
      and added eth0 interface definition to /etc/network/interfaces



      auto eth0
      iface eth0 inet static
      address 10.8.8.1
      netmask 255.255.255.0
      gateway 10.8.8.1
      broadcast 10.8.8.255


      I've added net.ipv4.ip_forward=1 in /etc/sysctl.conf



      On the net, I've read that it is possible to simply share the net using linux GUI.
      (here's easy guide with screenshots on how to share the connection)
      But it doesn't work in my case. If I change on my wlan0 (auto DHCP) to (share to other computers) I don't have internet access after rebooting because wlan0 do not automatically get connection info.



      Clients receive IP, default gateway, DNS'es, netmask and so.
      Mind any of u helping me with finding out, why it is not working?
      Im using ubuntu 12.04. Thanks.










      share|improve this question
















      Just as the title says. My DHCP assigns IP addresse and all that stuff to clients; however clients don't have access to the Internet. Here's my DHCP configuration:



      ddns-update-style none;
      option domain-name "home.lan";
      option domain-name-servers 8.8.8.8, 8.8.4.4;
      default-lease-time 600;
      max-lease-time 7200;
      option broadcast-address 10.8.8.255;
      subnet 10.8.8.0 netmask 255.255.255.0 {
      range 10.8.8.5 10.8.8.9;
      option routers 10.8.8.1;
      }
      broadcast-address 10.8.8.255


      I have of course added INTERFACES="eth0" in /etc/default/isc-dhcp-server
      and added eth0 interface definition to /etc/network/interfaces



      auto eth0
      iface eth0 inet static
      address 10.8.8.1
      netmask 255.255.255.0
      gateway 10.8.8.1
      broadcast 10.8.8.255


      I've added net.ipv4.ip_forward=1 in /etc/sysctl.conf



      On the net, I've read that it is possible to simply share the net using linux GUI.
      (here's easy guide with screenshots on how to share the connection)
      But it doesn't work in my case. If I change on my wlan0 (auto DHCP) to (share to other computers) I don't have internet access after rebooting because wlan0 do not automatically get connection info.



      Clients receive IP, default gateway, DNS'es, netmask and so.
      Mind any of u helping me with finding out, why it is not working?
      Im using ubuntu 12.04. Thanks.







      networking server dhcp






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 13 '17 at 12:23









      Community

      1




      1










      asked May 28 '13 at 15:45









      PatrykPatryk

      10414




      10414





      bumped to the homepage by Community 21 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community 21 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
























          2 Answers
          2






          active

          oldest

          votes


















          0














          In /etc/network/interfaces the address of the (remote) gateway should not be the same as the address of the local interface.






          share|improve this answer































            0














            Your first steps look fine, but you also have to setup IP masquarding(NAT) using iptables.



            Issue the following commands:



            iptables --table nat --append POSTROUTING --out-interface ethX -j MASQUERADE
            iptables --append FORWARD --in-interface eth0 -j ACCEPT


            That assumes that eth0 is your local LAN and ethX is your external interface(inet).
            I also suggest you put these commands into a init script, since they are volatile, the iptables rules are lost after a reboot.



            Before you continue i suggest you Google for "Ubuntu NAT", there are a lot of solutions for that problem with ready to use scripts.



            Good luck!






            share|improve this answer























              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "89"
              };
              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: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              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%2faskubuntu.com%2fquestions%2f301140%2fdhcp-working-but-clients-dont-have-internet%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














              In /etc/network/interfaces the address of the (remote) gateway should not be the same as the address of the local interface.






              share|improve this answer




























                0














                In /etc/network/interfaces the address of the (remote) gateway should not be the same as the address of the local interface.






                share|improve this answer


























                  0












                  0








                  0







                  In /etc/network/interfaces the address of the (remote) gateway should not be the same as the address of the local interface.






                  share|improve this answer













                  In /etc/network/interfaces the address of the (remote) gateway should not be the same as the address of the local interface.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered May 29 '13 at 6:48









                  jdthoodjdthood

                  10.5k14163




                  10.5k14163

























                      0














                      Your first steps look fine, but you also have to setup IP masquarding(NAT) using iptables.



                      Issue the following commands:



                      iptables --table nat --append POSTROUTING --out-interface ethX -j MASQUERADE
                      iptables --append FORWARD --in-interface eth0 -j ACCEPT


                      That assumes that eth0 is your local LAN and ethX is your external interface(inet).
                      I also suggest you put these commands into a init script, since they are volatile, the iptables rules are lost after a reboot.



                      Before you continue i suggest you Google for "Ubuntu NAT", there are a lot of solutions for that problem with ready to use scripts.



                      Good luck!






                      share|improve this answer




























                        0














                        Your first steps look fine, but you also have to setup IP masquarding(NAT) using iptables.



                        Issue the following commands:



                        iptables --table nat --append POSTROUTING --out-interface ethX -j MASQUERADE
                        iptables --append FORWARD --in-interface eth0 -j ACCEPT


                        That assumes that eth0 is your local LAN and ethX is your external interface(inet).
                        I also suggest you put these commands into a init script, since they are volatile, the iptables rules are lost after a reboot.



                        Before you continue i suggest you Google for "Ubuntu NAT", there are a lot of solutions for that problem with ready to use scripts.



                        Good luck!






                        share|improve this answer


























                          0












                          0








                          0







                          Your first steps look fine, but you also have to setup IP masquarding(NAT) using iptables.



                          Issue the following commands:



                          iptables --table nat --append POSTROUTING --out-interface ethX -j MASQUERADE
                          iptables --append FORWARD --in-interface eth0 -j ACCEPT


                          That assumes that eth0 is your local LAN and ethX is your external interface(inet).
                          I also suggest you put these commands into a init script, since they are volatile, the iptables rules are lost after a reboot.



                          Before you continue i suggest you Google for "Ubuntu NAT", there are a lot of solutions for that problem with ready to use scripts.



                          Good luck!






                          share|improve this answer













                          Your first steps look fine, but you also have to setup IP masquarding(NAT) using iptables.



                          Issue the following commands:



                          iptables --table nat --append POSTROUTING --out-interface ethX -j MASQUERADE
                          iptables --append FORWARD --in-interface eth0 -j ACCEPT


                          That assumes that eth0 is your local LAN and ethX is your external interface(inet).
                          I also suggest you put these commands into a init script, since they are volatile, the iptables rules are lost after a reboot.



                          Before you continue i suggest you Google for "Ubuntu NAT", there are a lot of solutions for that problem with ready to use scripts.



                          Good luck!







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered May 29 '13 at 7:32









                          ortangortang

                          1,5281011




                          1,5281011






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Ask Ubuntu!


                              • 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%2faskubuntu.com%2fquestions%2f301140%2fdhcp-working-but-clients-dont-have-internet%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

                              香粉寮

                              GameSpot