firewall query

 
Thread Tools Search this Thread
Homework and Emergencies Homework & Coursework Questions firewall query
# 1  
Old 12-07-2009
firewall query

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!

1. The problem statement, all variables and given/known data:
produce a report containing an iptable firewall definition for a system requproduce a report containing an iptable firewall definition for a system requiring the following features:
Full egress and ingress filtering (i.e. defaults are all REJECT)
The machine has only one network connection, eth0.
The machine runs ssh, telnet, apache, and qmail.
It should be able to surf the web, send email, and make DNS lookups.
The apache user should not be allowed to surf the web
You should make the rest of the rules as security focused (and sensible) as possible.
2. Relevant commands, code, scripts, algorithms:



3. The attempts at a solution (include all code and scripts):
iptables -F INPUT
iptables -F OUTPUT
iptables -F FORWARD

iptables -P INPUT REJECT
iptables -P OUTPUT REJECT
iptables -P FORWARD REJECT

iptables -A INPUT -p --sport 22 -j ACCEPT
iptables -A INPUT -p --sport 23 -j ACCEPT

iptables -A INPUT -p tcp --sport -p 80 -j ACCEPT
iptables -A INPUT -p tcp --sport -p 25 -j ACCEPT
iptables -A INPUT -p udp --sport DNS -j ACCEPT
iptables -A OUTPUT state --state NEW -p tcp --sport -m owner --uid-owner=apache -j DROP

this is what i have so far any help appreciated


4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
Napier university, Edinburgh, G Russell, CSN11101

Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Cybersecurity

Firewall

Hey Guys, I am looking for a good firewall software to implement in medium/large office, with at least 150 users. I was hopping you guys could help me on this one. Regards, (4 Replies)
Discussion started by: andrevicente
4 Replies

2. Shell Programming and Scripting

Shell Script to execute Oracle query taking input from a file to form query

Hi, I need to query Oracle database for 100 users. I have these 100 users in a file. I need a shell script which would read this User file (one user at a time) & query database. For instance: USER CITY --------- ---------- A CITY_A B CITY_B C ... (2 Replies)
Discussion started by: DevendraG
2 Replies

3. Linux

Firewall?

Dear All I have put my windows machine behind my centos firewall server with just one NIC. At now, the windows machine can ping 192.9.9.3 but cannot resolve valid url (like www.google.com). I have set DNS for it as well. Can you please let me know what is the missing step? Thank you (6 Replies)
Discussion started by: hadimotamedi
6 Replies

4. SuSE

Firewall

Is there a command line interface to the firewall? (4 Replies)
Discussion started by: jgt
4 Replies

5. Shell Programming and Scripting

Query Oracle tables and return values to shell script that calls the query

Hi, I have a requirement as below which needs to be done viz UNIX shell script (1) I have to connect to an Oracle database (2) Exexute "SELECT field_status from table 1" query on one of the tables. (3) Based on the result that I get from point (2), I have to update another table in the... (6 Replies)
Discussion started by: balaeswari
6 Replies

6. Cybersecurity

help with firewall

hi everyone I am a newbee to firewall scripting. cannot understand how to write rules per host. in ip6tables. anyone plz:( (2 Replies)
Discussion started by: xecutioner
2 Replies

7. Shell Programming and Scripting

add the output of a query to a variable to be used in another query

I would like to use the result of a query in another query. How do I redirect/add the output to another variable? $result = odbc_exec($connect, $query); while ($row = odbc_fetch_array($result)) { echo $row,"\n"; } odbc_close($connect); ?> This will output hostnames: host1... (0 Replies)
Discussion started by: hazno
0 Replies

8. Cybersecurity

Looking Out from Behind a Firewall

Would it be possible to restrict access to internet pages in the following way? A machine: IP = 128.1.17.123 Only pages from domains of the type "go.jp" and "ne.jp" are viewable. All others are not viewable or only partly viewable. B machine: IP = 128.1.17.146 Regardless of the domain... (4 Replies)
Discussion started by: mntamago
4 Replies

9. Cybersecurity

What Firewall do you use?

Just out of curiosity, I see a lot of people here use Linux IPTables as their firewall. Anyone here use something else like OpenBSD PF or *BSD IPF, IPFW? I'm quite fond of OpenBSD and their Packet Filters. I find their syntax much easier to manage and from my personal experience, I find them... (5 Replies)
Discussion started by: tarballed
5 Replies
Login or Register to Ask a Question