LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 02-13-2006, 07:28 AM   #1
09kevin77
LQ Newbie
 
Registered: Mar 2005
Location: Moncton NB Canada
Distribution: Fedora
Posts: 15

Rep: Reputation: 0
iptables question


I have built a nice iptables based firewall and am now trying to lock it down. My question is this:

I want to deny web access (which i have done successfully), but I would like to allow mapquest (fully functional), and grisoft (for downloading updates). I have looked and tried to allow the subdomains for these, but is there an easy rule(s) to enter that will allow this?

For example allow *.mapquest.com

Thanks all

Kevin
 
Old 02-13-2006, 03:17 PM   #2
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Are you trying to allow this from inside or outside?

If you are trying to allow web access only to these two sites then you simple place rules to allow the connection into the output chain before the blanket rule that denies web access.
 
Old 02-14-2006, 06:29 AM   #3
09kevin77
LQ Newbie
 
Registered: Mar 2005
Location: Moncton NB Canada
Distribution: Fedora
Posts: 15

Original Poster
Rep: Reputation: 0
I am denying web access to certain pc's (going out) and I understand what you are telling me, but my question was what is the rule I use?

When I tell it to allow everything from mapquest, do I use *.mapquest.com or mapquest.com, can someone provide me qith a rule so I can see?

Thanks.

Kevin
 
Old 02-14-2006, 10:39 AM   #4
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Code:
iptables -I FORWARD -p TCP -i $LAN_IFACE -o $WAN_IFACE \
-d mapquest.com -j ACCEPT
BTW, i don't think it's a good idea to do domain filtering with iptables... i mean, i could be wrong, but i assume the IP would be resolved when the script is run and then the IP will be used from that point forward, in which case the filtering wouldn't work if mapquest.com changes the IP or if the client is redirected to a different IP than the one which was resolved when the script was run...
 
  


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
iptables v1.2.9: Unknown arg `/sbin/iptables' Try `iptables -h' or 'iptables --help' Niceman2005 Linux - Security 4 12-29-2005 08:20 PM
iptables question wardialer Linux - Security 13 02-14-2005 04:03 PM
iptables question linuxtesting2 Linux - Security 1 10-20-2004 11:03 AM
IPTables Question rootyard Linux - Networking 1 06-24-2004 04:31 PM
iptables question Texicle Slackware 7 01-19-2003 12:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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