LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 06-22-2006, 08:59 AM   #1
dsids
Member
 
Registered: Mar 2006
Distribution: FC4
Posts: 184

Rep: Reputation: 31
how to manipulate iptables in RHEL3 using ssh


Hi Everybody,
I just installed RHEL3 on one of my machines in my house..Although Im able to access my RHEL3 machine using ssh, and then starting httpd but because of the iptables Im not able to access httpd through the web browser..
Can anyone help me out to access the iptables configuration in RHEL3 where I can mention : allow httpd inside the LAN...


Thanks
Danish
 
Old 06-22-2006, 09:34 AM   #2
prozac
Member
 
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753

Rep: Reputation: 32
you need to allow port 80 for atleast your lan. The Rhel has weird looking rules. Personally i would just do the following
Code:
localhost=x.x.x.x
lan=x.x.x.x/x.x.x.x
/sbin/iptables -A INPUT -p tcp -s $localhost -d $lan --dport 80 -j ACCEPT
and then re-run the firewall script.
 
Old 06-23-2006, 12:34 AM   #3
dsids
Member
 
Registered: Mar 2006
Distribution: FC4
Posts: 184

Original Poster
Rep: Reputation: 31
Thanks I followed ur way...it worked

Danish
 
Old 06-23-2006, 04:38 AM   #4
dsids
Member
 
Registered: Mar 2006
Distribution: FC4
Posts: 184

Original Poster
Rep: Reputation: 31
Its not working...My webserver is running on port 8080

# iptables -L Chain INPUT (policy ACCEPT)
target prot opt source destination
RH-Firewall-1-INPUT all -- anywhere anywhere
ACCEPT tcp -- localhost.localdomain codecindia.com tcp dpt:webcache

Chain FORWARD (policy ACCEPT)
target prot opt source destination
RH-Firewall-1-INPUT all -- anywhere anywhere

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Chain RH-Firewall-1-INPUT (2 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT icmp -- anywhere anywhere icmp any
ACCEPT ipv6-crypt-- anywhere anywhere
ACCEPT ipv6-auth-- anywhere anywhere
ACCEPT all -- anywhere anywhere state RELATED,ESTABL ISHED
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ss h
REJECT all -- anywhere anywhere reject-with icmp-hos t-prohibited


Danish
 
Old 06-23-2006, 04:44 AM   #5
prozac
Member
 
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753

Rep: Reputation: 32
Quote:
Originally Posted by dsids
Thanks I followed ur way...it worked
Quote:
Originally Posted by dsids
Its not working...My webserver is running on port 8080
then open the --dport 8080. just the same as opening dport 80.
 
  


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
SSH and IPTABLES metallica1973 Linux - Security 17 09-05-2005 07:02 PM
manipulate the floppy bruse Mandriva 1 02-22-2005 07:49 AM
iptables and ssh iomari Linux - Networking 6 10-01-2004 07:44 PM
ssh / iptables bruj3w Linux - Networking 17 08-05-2004 12:00 PM
need to manipulate dates clsonnt Programming 5 08-19-2003 10:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 12:25 AM.

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