No need to destroy the ubuntu installation, there doesn't seem to be anything wrong with it.
If the router is 192.168.0.1 you need to set for example the 192.168.0.10 address on eth0, and internet should work.
Printable View
No need to destroy the ubuntu installation, there doesn't seem to be anything wrong with it.
If the router is 192.168.0.1 you need to set for example the 192.168.0.10 address on eth0, and internet should work.
Alright Darkod you convinced me to continue on with my challenge. Does it matter that I am also using a squid proxy server for the dhcp as well? I did as you advised with using 192.168.0.10 as the address for eth0 but still cannot connect to the internet. I even tried 192.168.1.10 on eth0 and still nothing. I first need to get the internet back on working. I have toggled with the interfaces quiet a few times but I do not think that, that is where the problem relies. Any ideas?
Hmm, I am not sure how it would work with a proxy in the picture. Usually you would leave servers outside the proxy but it depends if the network can accept this configuration and allow the server to go out only using the router and without the proxy.
If it doesn't allow it, yes, you have to take that into account too. Because in that case the internet goes through the proxy which would apply for this server too. From the router point of view, the server will be just a client.
So even if you reinstall the OS, you will still have the same issue.
Also, the 192.168.0.10 I suggested is just an example. Make sure another machine is not using the same IP address. It's best to select a static IP which is outside the router dhcp range so that it can't be delegated to another machine.
PS. In /etc/network/interfaces you did change the gateway to 192.168.0.1 right? And you have to either restart the server or just the networking with:
sudo /etc/init.d/networking restart
so that the changes take effect.
It sounds to me like all you are missing is "masquerading" or "network address translation." You've already taken care of the problem of enabling packet forwarding, but you don't seem to have a masquerading rule.
I've lost track of which interface points to the Internet and which to the local network, but if eth0 points to the Internet, try adding this rule to iptables:
replacing "[your machine's external IP address]" with the IP assigned to eth0. That tells the computer to "masquerade" all traffic sent out the eth0 interface and pretend that the traffic is coming from this machine's externally-facing address.Code:sudo iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to [your machine's external IP address]
If this works, add the command (without sudo) to /etc/rc.local so it will be run any time the machine boots up.
Thank you guys for all the help with everything! I was able to get the DHCP working with some configuring within my interfaces. I figured out how to get my subnet add and also did some changes in the dhcpd.conf file. Thanks you all a million! Darokod you are awesome. Now the my squid3 proxy is acting up but I can figure that out through some configuring. Thank you all again, you guys have no idea how grateful I am.