linux as server

i have a linux server machine which has two network cards and one is connected to modem and the other is connected to hub.i want to know how to make my windows user access internet thru this linux.

how to configure the firewall for internet.
which server shoul i use(apache or samba).
pls tell me how to configure it in detail.
macharAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

psimationCommented:
If you want the linux box to act as a pure gateway, then first you must make sure that the linux box can access the net on it's own via the modem.

Then you need to enable ip_forwarding and route trafic through the interface to the LAN.

The modem will most probably be your ppp0 interface, so you can use the following lines from a command prompt to accomplish the task?:

# echo "1" > /proc/sys/net/ipv4/ip_forward
# iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

All of this is ofcourse dependant on whether your TCP/IP networking is correctly configured. You must be able to ping to and from all machine on the lan.

Also make sure that your DNS is correct. If you cannot browse by name, but can browse by IP, then you have no DNS entries.

Concerning APAche and SAMBA.
Apache is a webserver, and it is meant to host websites on. You don't need apache to establish connections or to share connections, but you can use it to create your own intranet or as a test platform for web development.
Apache is usually included with most Linux OS', and you should only need to configure the /etc/httpd/conf/httpd.conf file by setting a ServerName and a DocumentRoot, and then start the daemon with service httpd start

Samba is meant for sharing files and printers over your network between Linux and windows machines, and is again not needed to share connections.
It is however rather usefull to access files on your Linux box while on a windows workstation and vice versa.
Go to my website at www.linuxhelp.co.za and follow the networking link on the main navigation to see a short tutorial of setting up samba.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
flashtekCommented:
Alternativly use smoothwall... http://www.smoothwall.org/ it's what I use, fast, secure, small, free.. 20MB ISO download to make a rock solid proxy/firewall in a box.

HTH
0
CleanupPingCommented:
machar:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Networking

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.