Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I currently have a mounted windows external network drive so that I can run bash scripts that save to this mounted file. It works fine when iptables is turned off, but when I turn iptables on I receive the error "cannot access /mnt/external-folder: Host is down"

I have tried several different iptables rules, but I have been unsuccessful. Any help would be greatly appreciated.

Here is the result of mount:

192.168.100.108:/Powerhouse/Public/Programming on /mnt/Programming type cifs (rw)

Here is my iptables config so far. I removed all my attempts to get the mnt to the external folder working:

:INPUT DROP [5:923]
:FORWARD DROP [0:0]
:OUTPUT DROP [0:0]
:LOGGING - [0:0]
-A INPUT -i eth0 -p tcp -m tcp --dport 2369 -m state --state NEW,ESTABLISHED -j ACCEPT
-A INPUT -i eth0 -p tcp -m multiport --dports 80,443 -m state --state NEW,ESTABLISHED -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -s 192.168.100.0/24 -i eth0 -p tcp -m tcp --dport 3306 -m state --state NEW,ESTABLISHED -j ACCEPT
-A INPUT -p tcp -m tcp --sport 25 -m state --state ESTABLISHED -j ACCEPT
-A OUTPUT -o eth0 -p tcp -m tcp --sport 2369 -m state --state ESTABLISHED -j ACCEPT
-A OUTPUT -o eth0 -p tcp -m multiport --sports 80,443 -m state --state ESTABLISHED -j ACCEPT
-A OUTPUT -o lo -j ACCEPT
-A OUTPUT -o eth0 -p tcp -m tcp --sport 3306 -m state --state ESTABLISHED -j ACCEPT
-A OUTPUT -p tcp -m tcp --dport 25 -j ACCEPT
-A OUTPUT -d 192.168.100.108/32 -j ACCEPT
COMMIT
share|improve this question
    
Can you paste the output of mount into your question, making it clear which is the external drive? –  MadHatter Apr 23 '13 at 20:18
    
info about iptables rules in your firewall will be helpful too. –  pQd Apr 23 '13 at 20:26
add comment

1 Answer 1

Maybe you need to allow samba ports for cifs to work:

-I INPUT -j ACCEPT -p tcp --dport 139
-I INPUT -j ACCEPT -p tcp --dport 445
-I INPUT -j ACCEPT -p udp --dport 137:138
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.