LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Help for implement this scenario. (https://www.linuxquestions.org/questions/linux-server-73/help-for-implement-this-scenario-4175546317/)

hack3rcon 06-24-2015 10:50 AM

Help for implement this scenario.
 
Hello.
I have a ADSL connection with a Asus ADSL Modem and want launching a Linux gateway.
I bought a Raspberry Pi and want to install Linux on it and use it as my Linux firewall and my Linux PC use this device for connected to the Internet.
My scenarios is that connect ADSL Modem to Pi NIC and connect my PC to external NIC that connected to USB port of Pi.

My questions are :
1- How can I share internet from Pi to my PC? Should I use Squid-cache for share internet service? Can I use route command for forward internet to my PC?
2- As I said, I want to use this device as a firewall and I want to disable some useless services on it, Which services must be disabled?
3- Must I use DHCP service?

Thank you.

rtmistler 06-24-2015 11:36 AM

You could either use a wired USB to Ethernet device or a wireless USB to WIFI device on the Pi to allow your PC to attach to it. If you choose the WIFI option there's software like a host AP daemon which will behave as an access point for you.

Only you can really determine what services are useless where you should block them. The rule of thumb I've always used it to turn them all off and then turn on things you need based on how you access the Internet and also evaluate whether or not each choice is a good idea.

As far as DHCP, well I'd think the Pi should DHCP from the cable modem to get it's address, unless they set your home network up where it is a fixed IP. And as far as the PC or PCs attaching to the Pi? Why not DHCP? You can use fixed IP addresses, but I see no benefit one way or another except that you'd have to manage it more if you used static IP and had topology changes occurring in your network.

hack3rcon 06-25-2015 09:41 AM

I just want wire connection and not wireless.
How about sharing internet from Pi to my PC?

hack3rcon 06-26-2015 06:41 AM

Any idea?

michaelk 06-26-2015 07:58 AM

There is lots of information on how to setup a linux NAT router. The most basic firewall can be configured very easily as in the link below. Most ADSL MODEMS are also routers so you could disable it by configuring in bridge mode. If you do configure as a bridge you will also need to add pppoe to the Pi to log in to your ISP.

http://www.revsys.com/writings/quicktips/nat.html


All times are GMT -5. The time now is 01:12 AM.