Internet sharig and file sharing are two completely separate issues.
1) I am on a hub and I have two separate cards (one for the Internet and
one for home/office): setting is much easier and safer, and traffic is
completely separate.Adding a card is cheap and easy.
You set the first card to Internet and try it: if it works you set the
network parameters on second card.
But you have to tell the machine that is a router (see file
/etc/systcl.con)
kernel.sysrq=0
net.ipv4.ip_forward=1
net.ipv4.conf.default.rp_filter=1
kernel.core_uses_pid=1
At this point you must tell the machine that must do some NAT (Network
address translation) by setting appropriate iptables file in
/etc/sysconfig
This is mine...with eth0 card to the internal and ppp0 as Internet
connection
# Firewall configuration written by lokkit
# Manual customization of this file is not recommended.
# Note: ifup-post will punch the current nameservers through the
# firewall; such entries will *not* be listed here.
*filter
:FORWARD DROP [0:0]
:INPUT DROP [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A FORWARD -i eth0 -j ACCEPT
-A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -i eth0 -j ACCEPT
COMMIT
# Generated by webmin
*mangle
:FORWARD ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:PREROUTING ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
COMMIT
# Completed
# Generated by webmin
*nat
:PREROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
-A POSTROUTING -o ppp0 -j MASQUERADE
COMMIT
# Completed
Samba configuration in a separate message after confirmation of
success!!!
In any case I suggest to Install Webmin (that you can download at
Www.webmin.com)