5

How can I configure an Ubuntu server installation to provide internet access to private network, such that machines on the private network can access the internet through the Ubuntu server? The machine has two NICs of course.

4
  • what do you mean "internet access"
    – strugee
    May 14, 2013 at 18:37
  • :P Well, I mean internet access! There are many computers in a LAN network connected to server. The server itself is connected to internet.
    – sorush-r
    May 14, 2013 at 18:48
  • 1
    The best way to add additional information to your question is by editing it, with the edit button. It is better visible that way, and comments are mainly for secondary, temporary purposes. Comments are removed under a variety of circumstances. Anything important to your question should be in the question itself.
    – guntbert
    May 14, 2013 at 19:32
  • So, you want to turn the server into a router, then.
    – Thomas Ward
    Aug 24, 2019 at 17:31

2 Answers 2

7
  • You need to use Ubuntu as a firewall/gateway router. Please check this Scenario

enter image description here

Or you need Internet Connection Sharing (ICS) provides the ability for one computer to share its Internet connection with another computer. please check the wiki Internet/ConnectionSharing

0

Unless you are prepared to deal with a lot of automated attacks on your server, I would highly discourage this. Your router will provide a level of protection between you and the internet.

What exactly are you trying to accomplish? There might be a better way to do what you want. I have my ubuntu box acting as a DHCP server with dockerized Pi-Hole installed. It blocks a good majority of ads and allows me to fine-tune DHCP settings that the router won't let me.

If you really, really need to have the server facing externally, I would recommend that you harden the server significantly by denying all access to the internal LAN unless the request originated from within the LAN.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .