linux as server

Posted on 2003-02-26
Medium Priority
Last Modified: 2010-03-18
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.
Question by:machar
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 17

Accepted Solution

psimation earned 100 total points
ID: 8025229
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.

Assisted Solution

flashtek earned 100 total points
ID: 8028194
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.


Expert Comment

ID: 9077770
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 
Post your closing recommendations!  No comment means you don't care.

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question