?
Solved

IPtables help. Windows networking issue

Posted on 2006-05-16
5
Medium Priority
?
318 Views
Last Modified: 2010-04-20
Hi,
   These are the entries in my iptables but I keep receiving a permissions denied error whenever i browse over to the linux server's shares. All is good when the firewall is stopped.

# Firewall configuration written by system-config-securitylevel
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p 50 -j ACCEPT
-A RH-Firewall-1-INPUT -p 51 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
-A RH-Firewall-1-INPUT -s 10.0.9.0/22 -p tcp --dport 445 -j ACCEPT
-A RH-Firewall-1-INPUT -s 10.0.9.0/22 -p tcp --dport 139 -j ACCEPT
-A RH-Firewall-1-INPUT -s 10.0.9.0/22 -p udp --dport 137 -j ACCEPT
-A RH-Firewall-1-INPUT -s 10.0.9.0/22 -p udp --dport 138 -j ACCEPT

Thanks.
0
Comment
Question by:sudipmis
  • 2
  • 2
5 Comments
 
LVL 12

Expert Comment

by:Heem14
ID: 16691445
Try this..

iptables -A INPUT -p tcp -m multiport -s 10.0.9.0/22 --destination-ports 445,135,136,137,138,139 -j ACCEPT
iptables -A OUTPUT -p tcp -m multiport -d 10.0.9.0/22 --destination-ports 445,135,136,137,138,139 -j ACCEPT
iptables -A INPUT -p udp -m multiport -s 10.0.9.0/22 --destination-ports 445,135,136,137,138,139 -j ACCEPT
iptables -A OUTPUT -p udp -m multiport -d 10.0.9.0/22 --destination-ports 445,135,136,137,138,139 -j ACCEPT
0
 

Author Comment

by:sudipmis
ID: 16691823
Hi,
   added those entries but no luck. still get the same error, "resource not available."
0
 
LVL 8

Expert Comment

by:edkim80
ID: 16692025
put the -j REJECT as the last rule... it matches the rules in a linear order
0
 
LVL 8

Accepted Solution

by:
edkim80 earned 1000 total points
ID: 16692089
btw, you may need to specify the state as NEW

-A RH-Firewall-1-INPUT -s 10.0.9.0/22 -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT

for all your rules since you will be initiating the connection to the linux server
0
 

Author Comment

by:sudipmis
ID: 16692347
Thanks. REJECT was it.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month15 days, 21 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question