Help about this scenario.

J

Jason Long

Guest
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.
 


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?

Squid is not a mandatory to share Internet. But you have to configure:
1. Routing. The route command can be useful on this first step.
2. Forwarding. Look for ip_forwarding in your /etc/sysctl.conf.
3. Address translation (NAT). Look for SNAT target of iptables.

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?

The routing, packets forwarding and address translation are provided by Linux kernel. So, you have to start a Linux and to configure a network subsystem at least. No other services are required.

3- Must I use DHCP service?

As you wish. In the simplest case you can configure your PC to use a static IP from a private network (https://en.wikipedia.org/wiki/Private_network).
 

Staff online


Latest posts

Top