LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-09-2003, 09:41 AM   #1
pautorras
LQ Newbie
 
Registered: Sep 2003
Location: Igualada
Distribution: Red Hat 8.0
Posts: 1

Rep: Reputation: 0
Setting firewall script & server


I have two questions that are driving me crazy.
The first question is that I have a RH8.0 webserver with Apache, MySql and PHP and I wan't to run a firewall script to save me for hackers.
I've read a lot of scripts and tutorials and I note that all the configurations of those scripts are for a pc making the firewall job with normally 2 network cards, one connected to dsl and the other one connected in the local Lan.
The question is if it's possible to run the firewall in the same webserver and with one network card connected to dsl.
There are some examples that could help me?
Tanks.
The second is that I have the webserver configurated with Apache, MySql and PHP and when I start Mozilla to conect to my IP or my hostname the query is solved in กก40 seconds!!, don't you believe that is something wrong?
Now I don't have the connection to dsl, I'm connecting directly to my hostname without connection to internet.
Can this question be solved to be a little bit quickly?
Tanks.
Only a little clarify what is the difference about the "eth0" and "lo" when I type the ifconfig command to my terminal?
Tanks to all!

Pau (Barcelona - Spain).
 
Old 09-09-2003, 02:19 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Welcome to LQ.

You can run the apache etc on the same machine as the router but there would be an extra layer of security if you went with a router and a webserver. In terms of firewalling I tend to go with something very simple like:
# Drop all connections by default
iptables -P INPUT -j DROP
# Allow conenctions to the webserver
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
# Allow conenctions vi ssh
iptables -A INPUT -p tcp --dport 22 -j ACCEPT

If you want to set it up as a router too then there are plenty of tutorials on this site and others. If you want a dedicated router machine hten you are as well to use a dedicated distro that will run on an older machine such as IPCop or SmoothWall.

Let us know if you have problems or questions.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting up firewall / nat server da644 Linux - Networking 1 08-02-2005 08:22 PM
Setting up firewall and internal vpn server alon005 Linux - Security 3 12-27-2004 02:16 AM
Setting up a proxy & firewall mayordc Red Hat 3 11-24-2004 10:23 AM
setting up a linux server + firewall + nat ddaas Linux - Security 7 10-14-2004 06:42 PM
NAT'ing RC.FIREWALL Script & Port Forwarding Bittorrent wlfdgcrkz Linux - Networking 2 08-24-2004 10:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration