LinuxQuestions.org
Review your favorite Linux distribution.
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 09-27-2006, 11:50 PM   #1
SBN
Member
 
Registered: Jul 2006
Distribution: UBUNTU, CentOS, FEDORA 8
Posts: 474

Rep: Reputation: 30
Ports


-in creating a firewall what are the ports and services that should be allowed?
 
Old 09-28-2006, 12:34 AM   #2
Samotnik
Member
 
Registered: Jun 2006
Location: Belarus
Distribution: Debian GNU/Linux testing/unstable
Posts: 471

Rep: Reputation: 40
Exactly the ones you need.
 
Old 09-28-2006, 04:28 AM   #3
amitsharma_26
Member
 
Registered: Sep 2005
Location: New delhi
Distribution: RHEL 3.0/4.0
Posts: 777

Rep: Reputation: 31
1. In case of normal IPTABLES-SQUID setup.
Destination-port 80/443/53 OUT | TCP(for 80,443), TCP/UDP(for 53) -@INET-INTERFACE
Destination-port 8080/3128 IN | TCP(depending on if you are running PROXY accept for LAN) -@LAN-INTERFACE
ESTABLISHED & RELATED IN @INET-INTERFACE
ESTABLISHED & RELATED OUT @LAN-INTERFACE

2. In case of Iptables-transparent SQUID setup & MASQUAREDING

Destination-port 80/443/53 OUT | TCP(for 80,443), TCP/UDP(for 53) -@INET-INTERFACE
Destination-port 80/443/53 IN | TCP(for 80,443), TCP/UDP(for 53) -@LAN-INTERFACE
ESTABLISHED & RELATED IN @INET-INTERFACE
ESTABLISHED & RELATED OUT @LAN-INTERFACE

In last case & only in MASQUAREDING.. you got to,
Destination-port 80/443/53 FORWARD IN | TCP(for 80,443), TCP/UDP(for 53) -@LAN-INTERFACE
ESTABLISHED & RELATED FORWARD IN | @INET-INTERFACE

For rest of the ports & their direction of implementation;
you got to make list of services you are running & refer /etc/services for their port nos.

p.s. : ALL CHAINS HAVE DEFAULT POLICIES AS DROP.
 
Old 10-01-2006, 10:32 PM   #4
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
is this a router, a server, or a stand-alone PC?? the typical stand-alone PC won't need to allow any incoming connections to any port at all (all ports filtered), and outgoing connections would either be allowed to any port, or to "exactly the ones you need", as indicated by Samotnik... but really, the only way for us to advise you on which ports/services to allow is if you first provide a description of what the relevant box's duties are...

Last edited by win32sux; 10-01-2006 at 10:33 PM.
 
Old 10-03-2006, 09:27 PM   #5
SBN
Member
 
Registered: Jul 2006
Distribution: UBUNTU, CentOS, FEDORA 8
Posts: 474

Original Poster
Rep: Reputation: 30
-well basically the box acts as a firewall it has a squid configured on it and uses port 80. the only thing that the firewall should allow is for ftp & http download and web access.
 
Old 10-03-2006, 09:28 PM   #6
SBN
Member
 
Registered: Jul 2006
Distribution: UBUNTU, CentOS, FEDORA 8
Posts: 474

Original Poster
Rep: Reputation: 30
-well basically the box acts as a firewall it has a squid configured on it and uses port 80. the only thing that the firewall should allow is for safe and secure ftp & http download and web access.
 
  


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
Cannot Open Mail Server Ports 25, 110, and 220. Other Ports will open. Binxter Linux - Newbie 9 11-29-2007 02:03 AM
Ports...how-to.. hlinux SUSE / openSUSE 1 03-19-2005 09:05 AM
Ports weezel Linux - Security 3 06-09-2004 06:19 PM
Ports odd Linux - Software 2 06-02-2004 08:34 PM
Ports!!! therion12 Linux - General 15 01-12-2002 09:10 PM

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

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