2

I know it is possible to share an internet connection with another pc using ip-forwarding and masquerade.

Is it possible to set up the sharing computer as a DHCP server, so the settings (ip, gateway, dns) get configured for the client automatically?

The current way I do it, is that I setup the client NICs manually to access the internet from the client.

edit: this is the setup i plan to realize

-network_setup_graphic

  • yes, it is possible. I suggest to edit the question to add some details of your systems and perhaps change it such that you ask how to do it. This would make the question more interesting and useful ... – maxschlepzig Aug 10 '11 at 18:36
  • I am doing something very similar except I have a WLAN interface in the gateway and a simple switch instead of an AP. You can also run DNS resolver and HTTP proxy on the gateway. I am running log server and torrent client on it too. If you have a full blown PC as your gateway there are lots of thing you can do. You can have centralized passwords with LDAP. Or WPA with certificates. Your own mail server. Anything. – stribika Aug 11 '11 at 18:32
4

Yes, you can do that.

You should look into dnsmasq. It is designed to serve this very need.

The default DHCP server on Linux is usually ISC dhcpd. It's possible to make it work in this role, too, but it's a bit more difficult to configure, and it has to be manually configured to get the DNS server integration you get for free with dnsmasq.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.