I have a virtual server with Ubuntu Server 14 LTS. The provider has offered me NFS storage which I wanted to mount on the virtual server:
mount -t nfs 192.0.2.4:/space /mnt/nfs
However, I cannot mount it unless I completely disable iptables. My default settings were:
# Generated by iptables-save v1.4.21 on Sat Jan 16 17:26:45 2016
*filter
:INPUT DROP [184351:16661270]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [552598:2332433572]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
-A INPUT -s myip/32 -j ACCEPT
-A INPUT -s 192.0.2.4/32 -j ACCEPT
COMMIT
# Completed on Sat Jan 16 17:26:45 2016
I tried to allow the additional IP 192.0.2.4 completely (see above), but it does not change anything: I cannot mount the drive unless I completely allow all traffic:
iptables -P INPUT ACCEPT
Why is that? What do I have to do in order to make it work?