403 Forbidden using Different Subnet at Webserver

Its been hell since as brought new wd cloud gen2 4tb firmware version 2.30.165.

I have been trying to add a share in which public has fullview and a single user have a read/write access to that share. But so far i tried to edit “/etc/samba/smb.conf” but it seems that after every restart the smb.conf file is restored from the original one.
There I added & saved the configuration below:

[ Share_Edit]
comment = Public Read/Write 
path = /mnt/HD/HD_a2/Share
browseable = yes
oplocks = yes
map archive = no
write list = "admin"
read list =
invalid users = "nobody"
valid users = "admin"
# !!properties = "media_serving","remote_access"

[ Share ]
comment =
path = /mnt/HD/HD_a2/Share
browseable = yes
public = yes
available = yes
oplocks = yes
map archive = no
guest ok = yes
writable = no
# !!properties = "media_serving","remote_access"

After that I saved the file using command
cp /etc/samba/smb.conf /usr/local/config/smb.conf.bak
Now after every reboot I have to issue command to restore the edited file:
cp /usr/local/config/smb.conf.bak /etc/samba/smb.conf
and after that to restart the samba
smb restart

In order to stream my files on the disk I have to sym-link the Shared folder named “Share” to the webserver root directory every-time after restarting the WDCloud by the command below:
ln -s /mnt/HD/HD_a2/Share /var/www/Share

Now the real problem starts, after accessing the “http://wdmycloud/Share” I get 403 Forbidden so I created a .htaccess file inside the root of the Share Folder and inside the .htaccess I put
Options All +Indexes
which indeed resolved the file indexing and showed me the index list on the webserver “http://wdmycloud/Share

But when I started accessing the share using my Public WAN (IP/CNAME) it again showed me error 403 Forbidden. Then I figured out it was because of the WD Developers disabled different subnet access.

So I went to edit “/etc/apache2/sites-available/wdnas-ui.conf” and changed the line $ {} LOCAL_NET to Allow from all
after that restart the apache by command apache restart web
As I cannot find apache2 in init.d or either any service apache2
So cannot use “Service apache2 restart” or “/etc/init.d/apache2 restart”

But even after that the 403 Forbidden error did not resolve using the WAN Subnet IP/CNAME

But I can access the web address using http://wdmycloud/Share

Is there someone who can direct me to access the share on any subnet without getting 403 Forbidden.

I cannot use apps or hacks as I have already used almost 3/4 harddrive of valuable data.

Hi,

See if the following link helps