View Full Version : [ubuntu] ubuntu server 11.10 DHCP server 2 nic's clients cant surf

March 17th, 2012, 09:06 PM
Ok if I do ipconfig /all on the client's pc I get my IP and it shows the DNS but if try to surf no go ?

Gone fishing
March 17th, 2012, 09:34 PM
I'm assuming the server is between the internet and the clients if so it's not supprising - unless the server allows port forwarding etc. To connect to the internet you will need to allow port forwarding or use a proxy server.


March 18th, 2012, 12:40 AM
Ya that the tutorial I followed . also to start the dhcp3 server I have to type service isc-dhcp-server start or it will not run ?

Gone fishing
March 18th, 2012, 09:11 AM
If you followed that tutorial it should be

/etc/init.d/dhcp3-server start

and you can check the status with

/etc/init.d/dhcp3-server status

But are your clients getting address? If they are then the DHCP server is working the problem I would have thought is with the firewall rules and IP tables.

Let me plug Webmin which you may find makes it easier to set up the the system has Web based tools which makes it easy to switch services on and off set up the firewall etc.


Edit if the service isn't starting on boot

sudo update-rc.d dhcp3-server defaults

but have a look at Webmin.

March 18th, 2012, 09:21 AM
this is what i have

Gone fishing
March 18th, 2012, 09:53 AM
Have you enabled NAT?

Enable NAT

Add a firewall rule to enable packet forwarding
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
(the forwarding)
This configuration will be lost on a reboot so we need to save it.
iptables-save > /etc/iptables.rules

From the Howto

Sorry Things have changed and service isc-dhcp-server start is right


March 18th, 2012, 10:03 AM
yes i did that command you can see it in my post

Gone fishing
March 18th, 2012, 10:37 AM
Sorry what happens if you try and ping an external IP address from the clients? As it seems the clients are getting IP addresses and you have enabled port forwarding and NAT, I'm wondering about a DNS problem.

March 18th, 2012, 12:07 PM
Cant ping any thing on eth0. Or www.yahoo.com

March 18th, 2012, 12:57 PM
I got man, it was the DNS this what I did to fix it

I add this to my /etc/network/interface network Then added
the DNS IP addresses in my /etc/resolv.conf file to my /etc/dhcp/dhcpd.conf and put them where it said option domain-name-servers, and now iam surfing

Thanks for all your help.

Gone fishing
March 18th, 2012, 01:07 PM
Well Done!

Please mark as solved