Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 265
  • Last Modified:

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.
2 Solutions
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.
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.

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

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now