LinuxQuestions.org
Review your favorite Linux distribution.
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
 
LinkBack Search this Thread
Old 08-05-2009, 09:57 AM   #1
qwertyjjj
Senior Member
 
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,001

Rep: Reputation: 30
If I forward a port in iptables, does the port have to be open on the firewall?


If I forward port 80 to port 3128 for squid with an iptable rule, does port 3128 have to be open on the firewall or is this all routed behind the firewall?
 
Old 08-05-2009, 01:26 PM   #2
PresGas
Member
 
Registered: Jul 2008
Location: Bloomington, IN
Distribution: Ubuntu/Debian
Posts: 51
Blog Entries: 5

Rep: Reputation: 18
iptables IS the firewall for Linux, or at least the front-end for netfilter of which is the firewall for Linux. Are you meaning an external firewall perhaps?
 
Old 08-05-2009, 02:12 PM   #3
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,183

Rep: Reputation: 113Reputation: 113
You will have to accept port 3128 at your INPUT table, In iptable prerouting is happening first.
http://www.docum.org/docum.org/kptd/
 
Old 08-05-2009, 04:41 PM   #4
qwertyjjj
Senior Member
 
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,001

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by PresGas View Post
iptables IS the firewall for Linux, or at least the front-end for netfilter of which is the firewall for Linux. Are you meaning an external firewall perhaps?
Yes, there is an external hardware firewall on my box or on the network held by the host, which presumably picks up the IP and associated rules. So, a http request would come in on port 80.
To forward it, do I need to open the external firewall as well as forward it in iptables?
The external firewall has no forwarding facility in this case so it has to be done through iptables.
 
Old 08-06-2009, 09:22 AM   #5
PresGas
Member
 
Registered: Jul 2008
Location: Bloomington, IN
Distribution: Ubuntu/Debian
Posts: 51
Blog Entries: 5

Rep: Reputation: 18
If I am understanding you correctly, squid is also on the server. If that is the case, I believe you would only need to open up 80 on the outside firewall, as everything else would be done at the server.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
IPTables port forward help matux Linux - Networking 1 09-09-2008 10:54 AM
port 25 filtered despite firewall having port 25 open ille.pugil42 Linux - Security 8 03-09-2007 12:51 AM
Open Port - Linux Firewall - IPtables SBFree Linux - Networking 1 05-12-2006 07:03 AM
iptables port forward forbese Suse/Novell 1 02-12-2006 02:35 PM
How to port forward with IPTABLES... Scrag Linux - Security 6 12-13-2004 04:57 AM


All times are GMT -5. The time now is 07:39 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration