DHCP working but clients don't have internet
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
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.
add a comment |
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
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.
add a comment |
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
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
networking server dhcp
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.
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
In /etc/network/interfaces the address of the (remote) gateway should not be the same as the address of the local interface.
add a comment |
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!
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
In /etc/network/interfaces the address of the (remote) gateway should not be the same as the address of the local interface.
add a comment |
In /etc/network/interfaces the address of the (remote) gateway should not be the same as the address of the local interface.
add a comment |
In /etc/network/interfaces the address of the (remote) gateway should not be the same as the address of the local interface.
In /etc/network/interfaces the address of the (remote) gateway should not be the same as the address of the local interface.
answered May 29 '13 at 6:48
jdthoodjdthood
10.5k14163
10.5k14163
add a comment |
add a comment |
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!
add a comment |
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!
add a comment |
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!
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!
answered May 29 '13 at 7:32
ortangortang
1,5281011
1,5281011
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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