LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 01-28-2005, 11:52 AM   #1
dtournas
Member
 
Registered: Aug 2003
Location: Charlotte, North Carolina
Distribution: Red Hat (and look-alike), SUSE (when drunk), Slackware (when mad)
Posts: 148

Rep: Reputation: 16
Fedora acting as web server


Hi, I have setup a box with Fedora Core 3 and I have some questions.

1) I made a user "bob". No privilages no nothing. I want him to be the only one able to ssh the box. Is this possible?

2) I use this box only as webserver. I want to restrict all in/out coming traffic. I use Apache, sendmail, MySQL, FTP and ssh. So I assume I need open ports: 80, 25, 3306, 21 and 22. How can I close everything else?

3) How can I be sure that the "root" cannot connect from the "outside world" with the MySQL for security reasons?

Thank you!
 
Old 01-28-2005, 12:41 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
1) Yes, you may want to place him in a jail though depending on what you want him to do once logged in.
2) There are quite a few iptables tutorials but something simple would be:
Code:
iptables -F                                                # clear existing rules
iptables -A INPUT -p tcp --dport 80 -j ACCEPT                    # allow http
iptables -A INPUT -p tcp --dport 25 -j ACCEPT                    # allow smtp
iptables -A INPUT -p tcp --dport 22 -j ACCEPT                    # allow ssh
iptables -A INPUT -s 127.0.0.1 -d 127.0.0.1 -j ACCEPT            # allow loopback
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT # allow established
iptables -P INPUT DROP                                           # drop everything else
To stop root from connecting anywhere just delete the "root@%" user from the mysql user table. Obviously make sure you have a "root@localhost" accout first.
 
Old 01-28-2005, 12:45 PM   #3
dtournas
Member
 
Registered: Aug 2003
Location: Charlotte, North Carolina
Distribution: Red Hat (and look-alike), SUSE (when drunk), Slackware (when mad)
Posts: 148

Original Poster
Rep: Reputation: 16
Incredible!! Thank you for your reply!
 
  


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 a fedora web server Ab2kgj Linux - Newbie 1 10-12-2005 12:54 PM
Fedora Web Server Installation Issues sneakers Linux - Newbie 2 09-22-2005 03:33 PM
Suse or Fedora for just Web Server fr600 Linux - Newbie 5 04-13-2005 09:51 PM
Fedora v3, problem setting up web server JoelK04 Linux - Newbie 2 02-24-2005 05:49 PM
web server on fedora? alime Fedora 2 09-15-2004 03:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 12:49 PM.

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