# first time setup of network

## sweetangelhsd

here's what i would like to do:

make gentoo with gnome 1.4 be the firewall and router

be able to do file sharing with my laptop running windoze 98se

here's a list of the hardware i am using

two realtec 8139 cards

linksys wireless pcmia card for laptop

linksys 4 port router with wireless (router features are turned off because the firwall box is doning that job) 

dsl 1.5 meg static ip internet conntion

i also have a old computer setup to be the firewall and router right now but i would like to remove it

i am new to linux networking   :Wink: 

so what software would be the best to use and easier to install

and where can i find a useful setup guide 

thank you for your advice

----------

## Ferdy

Ok, you will need for:

* Firewall and router task, iptables.

* Gnome1.4 task, gnome. (hehe;))

* Sharing files, samba

The best way to get all of them working is using emerge.

You will have to recompile your kernel to get Iptables support, SMB and support for your realtec cards.

IMHO use FTP instead of SMB (protfpd server woud be fine)

Just my two cents

----------

## delta407

 *sweetangelhsd wrote:*   

> make gentoo with gnome 1.4 be the firewall and router

 

Why do you want to load Gnome onto a firewall? That's generally considered a Bad Idea, or Bad Practice at the least. Get iptables, that'll firewall you good.

 *sweetangelhsd wrote:*   

> be able to do file sharing with my laptop running windoze 98se

 

Use Samba. There's no point in running FTP when Samba would work better overall (easy integration with Windows). Samba's not all that hard to set up, and if it's just an internal network thing, you ought to be very happpy with it.

 *sweetangelhsd wrote:*   

> i am new to linux networking  

 

Linux networking is exactly the same as other networking; the concepts are the same, but you have different tools.

----------

## hamletmun

HOWTO  - Make your Internet Connection Sharing to work

From ISP to GENTOO - (eth0:DHCP or STATIC IP)

From GENTOO to WINDOWS - (eth1:192.168.0.1)

1.

insmod your.nic.module (i.e. "insmod 3c59x") for both nics if differ

2.

if your ISP uses DHCP, "dhcpcd eth0"

if static, "ifconfig eth0 your.static.ip netmask 255.255.255.0 gateway your.isp.gateway"

Now is time to configure the connection sharing

this is just for kenels greater than 2.4.x with iptables

1.

insmod iptables_nat

2. 

echo 1 >/proc/sys/net/ipv4/ip_forward

3.

iptables -F 

iptables -t nat -F 

iptables -P INPUT ACCEPT 

iptables -P OUTPUT ACCEPT 

iptables -P FORWARD ACCEPT 

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

(if your linux uses eth0 to connect your isp)

4.

In the Windows Machine:

192.168.0.1 in the gateway

numbers from your /etc/resolv.conf in DNS server

----------

