LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-11-2013, 10:36 AM   #1
marco1965
LQ Newbie
 
Registered: Aug 2013
Posts: 3

Rep: Reputation: Disabled
question about firewall ufw


i guys i have some good question for you i'm a bit lost

i need to install and configure the firewall in my linux server {ufs}
for the install no problem

sudo ufw enable ... the easy part done

first question
i need to add a simple rule to block protocol http

second question create a complex rule to block protocol UDP from all incoming and all traffic on port 53

create a complex rule who allow protocol TCP come from 10.1.2.254 255.255.255.0 to 192.168.7.25 on port 26

and after all that my server must accept all nfs,dns,ssh,apache,dhcp,and squirrelmail ....
and idea ????
 
Old 08-11-2013, 12:44 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
Have you looked at any UFW documentation? However, if I was to do this, I would skip UFW and just use iptables. All Linux firewalls use the NetFilter functionality in the kernel anyhow, and iptables is the standard way of interfacing with that. I suspect more people here know about iptabes than UFW, and your firewall ruleset will be portable to a distro that does not install UFW. Plus, there are a number of tutorials such as this one that can help you do most of what you specify.

However, some of the things you ask for are nonsensical. For example, you say you want to block all traffic on UDP port 53, but then say your server must accept DNS traffic, which runs on port 53. I suppose you could do this and only accept TCP DNS traffic, but this seems a bit pointless. Likewise, you block all HTTP traffic, but say you want to allow SquirrelMail traffic. SquirrelMail is a web based e-mail client, so if you don't allow HTTP traffic, no one will be able to access it.

It also looks like this machine will act as a router, which requires additional considerations and configuration, especially if NAT is to be done.
 
1 members found this post helpful.
Old 08-11-2013, 01:12 PM   #3
marco1965
LQ Newbie
 
Registered: Aug 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by btmiller View Post
Have you looked at any UFW documentation? However, if I was to do this, I would skip UFW and just use iptables. All Linux firewalls use the NetFilter functionality in the kernel anyhow, and iptables is the standard way of interfacing with that. I suspect more people here know about iptabes than UFW, and your firewall ruleset will be portable to a distro that does not install UFW. Plus, there are a number of tutorials such as this one that can help you do most of what you specify.

However, some of the things you ask for are nonsensical. For example, you say you want to block all traffic on UDP port 53, but then say your server must accept DNS traffic, which runs on port 53. I suppose you could do this and only accept TCP DNS traffic, but this seems a bit pointless. Likewise, you block all HTTP traffic, but say you want to allow SquirrelMail traffic. SquirrelMail is a web based e-mail client, so if you don't allow HTTP traffic, no one will be able to access it.

It also looks like this machine will act as a router, which requires additional considerations and configuration, especially if NAT is to be done.
thanks for your anwser and the link i will read that ... i know it a bit confusing the rule but it was ask by a teacher .....
 
Old 08-11-2013, 08:49 PM   #4
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
Aha. Is this perchance part of a homework assignment for a course? As a general rule, LQ does not allow posters to directly solve other people's homework assignments. You'll learn a lot more doing it yourself. That being said, if you run into trouble carrying out the assignment, you can post exactly what you've tried here and what is not working, and people will try to answer any specific questions that you might have.
 
Old 08-12-2013, 08:58 AM   #5
marco1965
LQ Newbie
 
Registered: Aug 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by btmiller View Post
Aha. Is this perchance part of a homework assignment for a course? As a general rule, LQ does not allow posters to directly solve other people's homework assignments. You'll learn a lot more doing it yourself. That being said, if you run into trouble carrying out the assignment, you can post exactly what you've tried here and what is not working, and people will try to answer any specific questions that you might have.
you know if i decide to create post it because i've tired all i know and after 2 day of reading i did not solve the problem !!

Last edited by marco1965; 08-13-2013 at 04:01 PM.
 
  


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
[SOLVED] Whether ufw iptables support nating & Mac address restriction through firewall sanjay87 Linux - Server 1 03-05-2012 09:28 AM
[SOLVED] ufw judoka Linux - Networking 5 07-08-2010 03:03 PM
ufw firewall rhlnewbie Linux - Software 2 10-18-2009 03:23 PM
LXer: Ubuntu 9.10 UFW Firewall LXer Syndicated Linux News 0 10-15-2009 01:02 AM
LXer: Gufw - Simple GUI for ufw (Uncomplicated Firewall) in Ubuntu LXer Syndicated Linux News 0 09-30-2008 03:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:55 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