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 11-10-2008, 08:11 PM   #1
cedricd
LQ Newbie
 
Registered: Nov 2008
Posts: 9

Rep: Reputation: Disabled
Question IPTables Help on Ubuntu 8.04


I currently have this:

Code:
$IPT -A OUTPUT -p tcp --dport 80 -m state --state NEW -j ACCEPT
It works well, allows all requests out on port 80, however I want it to be more strict.

Is there any way to modify that so it can ONLY connect to the dns i specify? (I could use IP if DNS is not an option)

Example:

Allow outgoing traffic to x.x.x.x on port 80.
Also allow outgoing traffic to x.x.x.y on port 80.

Thanks!
 
Old 11-10-2008, 08:44 PM   #2
cedricd
LQ Newbie
 
Registered: Nov 2008
Posts: 9

Original Poster
Rep: Reputation: Disabled
Never mind, got it!

[HTML]$IPT -A OUTPUT -p tcp --dport 80 -d x.x.x.x -m state --state NEW -j ACCEPT[/HTML]
 
  


Reply

Tags
iptables



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 rules for an ubuntu gateway (filtering connections to and from Internet) Zingaro2002 Linux - Networking 4 05-06-2007 02:01 AM
Patch iptables with imq support in Ubuntu nw504 Linux - Networking 0 03-21-2007 05:24 AM
iptables on Ubuntu 6.06 Server PetruM Linux - Security 3 07-18-2006 11:18 PM
iptables v1.2.9: Unknown arg `/sbin/iptables' Try `iptables -h' or 'iptables --help' Niceman2005 Linux - Security 4 12-29-2005 08:20 PM
My iptables script is /etc/sysconfig/iptables. How do i make this baby execute on boo ForumKid Linux - General 3 01-22-2002 07:36 AM

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

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