0

I am running into issues attempting to mount a folder on a CentOS server, which was shared from another CentOS server.
I set it up following option two on https://www.howtogeek.com/176471/how-to-share-files-between-windows-and-linux/
I managed to mount the share on Windows just fine, so I don't think I have a firewall issue on the hosting server.
I am attempting to mount this with autofs, this is my config:

winbox -fstype=cifs,rw,noperm,user=USERNAME,pass=PASSWORD ://MYIPADDRESS/Share

When I try to cd into the relevant folder, I get the following in my logs:

Sep 19 00:29:35 Base automount[28600]: handle_packet: type = 3
Sep 19 00:29:35 Base automount[28600]: handle_packet_missing_indirect: token 76, name winbox, request pid 24536
Sep 19 00:29:35 Base automount[28600]: attempting to mount entry /mymountfolder/winbox
Sep 19 00:29:35 Base automount[28600]: lookup_mount: lookup(file): looking up winbox
Sep 19 00:29:35 Base automount[28600]: lookup_mount: lookup(file): winbox -> -fstype=cifs,rw,noperm,user=USERNAME,pass=PASSWORD ://MYIPADDRESS/Share
Sep 19 00:29:35 Base automount[28600]: parse_mount: parse(sun): expanded entry: -fstype=cifs,rw,noperm,user=USERNAME,pass=PASSWORD ://MYIPADDRESS/Share
Sep 19 00:29:35 Base automount[28600]: parse_mount: parse(sun): gathered options: fstype=cifs,rw,noperm,user=USERNAME,pass=PASSWORD
Sep 19 00:29:35 Base automount[28600]: parse_mount: parse(sun): dequote("://MYIPADDRESS/Share") -> ://MYIPADDRESS/Share
Sep 19 00:29:35 Base automount[28600]: parse_mount: parse(sun): core of entry: options=fstype=cifs,rw,noperm,user=USERNAME,pass=PASSWORD, loc=://MYIPADDRESS/Share
Sep 19 00:29:35 Base automount[28600]: sun_mount: parse(sun): mounting root /mymountfolder, mountpoint winbox, what //MYIPADDRESS/Share, fstype cifs, options rw,noperm,user=USERNAME,pass=PASSWORD
Sep 19 00:29:35 Base automount[28600]: do_mount: //MYIPADDRESS/Share /mymountfolder/winbox type cifs options rw,noperm,user=USERNAME,pass=PASSWORD using module generic
Sep 19 00:29:35 Base automount[28600]: mount_mount: mount(generic): calling mkdir_path /mymountfolder/winbox
Sep 19 00:29:35 Base automount[28600]: mount_mount: mount(generic): calling mount -t cifs -s -o rw,noperm,user=USERNAME,pass=PASSWORD //MYIPADDRESS/Share /mymountfolder/winbox
Sep 19 00:29:35 Base automount[28600]: spawn_mount: mtab link detected, passing -n to mount
Sep 19 00:29:35 Base automount[28600]: >> Unable to find suitable address.
Sep 19 00:29:35 Base automount[28600]: mount(generic): failed to mount //MYIPADDRESS/Share (type cifs) on /mymountfolder/winbox
Sep 19 00:29:35 Base automount[28600]: dev_ioctl_send_fail: token = 76
Sep 19 00:29:35 Base automount[28600]: failed to mount /mymountfolder/winbox
Sep 19 00:29:35 Base automount[28600]: handle_packet: type = 3
Sep 19 00:29:35 Base automount[28600]: handle_packet_missing_indirect: token 77, name winbox, request pid 24536
Sep 19 00:29:35 Base automount[28600]: dev_ioctl_send_fail: token = 77
Sep 19 00:29:35 Base automount[28600]: handle_packet: type = 3
Sep 19 00:29:35 Base automount[28600]: handle_packet_missing_indirect: token 78, name winbox, request pid 24536
Sep 19 00:29:35 Base automount[28600]: dev_ioctl_send_fail: token = 78

The root of the issue from what I can tell being:

>> Unable to find suitable address.

When I tried to mount it directly, I am getting the same issue. However nothing I can find is pointing me in the right direction.
I can ping the IP address just fine, this is also not a local server.

I think I have actually narrowed down the issue to my firewall on the host server. I have the following in my iptables:

-A INPUT -m state --state NEW -m tcp -p tcp --dport 445 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 445 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 137 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 138 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT

If I disable iptables things work just fine, so I must be missing something above.

Jon Heckman
  • 73
  • 1
  • 2
  • 6

0 Answers0