Access NAS content thru OpenVPN server running on the NAS


Recommended Posts

I just made a OpenVPN server running on a NAS which has this feature. I have been able to connect a client to it (locally, giving me 10.11.11.6) but I have no idea the IP i should access to view the content (files). The range is 10.11.11.2 - 10.11.11.254 so I tried 10.11.11.1 but nothing.

 

What should I do? Ask things that you might need for more information which I might not have thought on giving.

 

Thank you.

Server config:

 

port 9411
proto udp
dev tun
ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/myserver.crt
key /etc/openvpn/keys/myserver.key
auth-user-pass-verify /usr/sbin/vpn_check_account via-env
client-cert-not-required
username-as-common-name
no-name-remapping
dh /etc/openvpn/keys/dh1024.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist /var/log/ipp.txt
push "redirect-gateway def1"
push "dhcp-option DNS 192.168.100.29"
client-to-client
duplicate-cn
keepalive 10 60
reneg-sec 0
cipher AES-256-CBC
comp-lzo
max-clients 5
client-connect /etc/openvpn/connect.sh
client-disconnect /etc/openvpn/disconnect.sh
management localhost 7505
persist-key
persist-tun
status /var/log/openvpn-status.log
#log /tmp/openvpn.log
verb 3

 

Client config:

 

client
dev tun
proto udp
remote 192.168.100.87 9411
resolv-retry infinite
nobind
ca ca.crt
auth-user-pass
reneg-sec 0
cipher AES-256-CBC
comp-lzo

  • 1 month later...

" but I have no idea the IP i should access to view the content"

You would connect to the IP of the nas 192.168.100.87 clearly right there in the config you posted, with whatever protocol it uses to serve up the files. Be it http, ftp, webdav, cifs/smb, etc.

The IP address it is given you is just a network connection that is to be used as a tunnel to access the nas.. So for example your out on the internet with an IP 192.168.1.100 behind your nat router.. And you want to access your NAS that is also behind a nat router on say 192.168.100.87 (which is in your config you posted).. So you have this

post-14624-0-61256100-1383742391.png

Now you could port forward say http to your nat router to your nas and access it that way via http to your publicIP-B.. Or you could connect via vpn.. Your config there is for OpenVPN, So it is listening on port 9411 per your config. So you would forward udp 9411 to your NAS which again is in your config.

Then from the internet you would connect to your publicIP-B in the drawing above from your remote location using openvpn client. It would then create a tunnel network between you using

server 10.8.0.0 255.255.255.0

per your config - so not sure where you got 10.11 from? And tells client on the other end that hey if you want to get to off your network go down the tunnel

push "redirect-gateway def1"

Which is not really a good config for this sort of setup, you would must rather just push a route to your nas network vs changing the gateway.

something like

push "route 192.168.100.0 255.255.255.0"

Anyhoo your connection would then be like this

post-14624-0-80795600-1383742395.png

And to connect to your NAS IP 192.168.100.87 your remote person would go through the VPN tunnel and directly access it. This still flows over the internet, but the details are hidden to you as the user, and from your machines point of view its just got a new network connection on 10.8 network - and it uses this connection to connect to the 192.168.100/24 network.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Apple reportedly looks to blacklisted Chinese memory chips as RAM prices climb by Karthik Mudaliar Image via Apple Apple is reportedly trying to get a clearance from the Trump administration to buy memory from ChangXin Memory Technologies (CXMT) to get some relief from soaring DRAM prices. As per a report by the Financial Times, Apple approached the Commerce Department more than a month ago and also spoke to other officials and allies in Washington. For starters, CXMT is a company that's already been placed on the Pentagon's list of Chinese military companies. The Chinese company is the country's top DRAM maker. For Apple, the timing is certainly awkward but not surprising. Tim Cook had recently warned that Apple would have to raise prices because AI companies are buying up large amounts of memory for data centers, and just like that, Apple raised MacBook and iPad prices. Micron also recently revealed that customers have committed billions of dollars to secure memory supply years in advance, which shows us how aggressive securing infrastructure has become. This gives suppliers such as Samsung, SK Hynix, and Micron more leverage, while pushing hardware makers to look for alternatives. CXMT is one of those alternatives, but not the simplest one. Apple has spent many years trying to diversify parts of its supply chain away from China, especially for final assembly, while still depending heavily on Chinese manufacturing and suppliers. Even domestic brands from China are moving towards CXMT and YMTC instead of relying on Samsung, Micron, and SK Hynix. For Apple, though, it would invite more scrutiny than local Chinese companies. For now, this is more like a lobbying effort rather than a confirmed supply deal. There's no official statement from either of the parties. What is clearer, though, is the pressure behind such a request. AI demand has certainly made hardware a bottleneck, and companies are trying everything they can to bring things back to normal, even if that means making politically sensitive choices. Source: Financial Times
    • I did test it a month or so back, but ... the results I expect to be on the first page are not there.
    • Neowin is saying these are good prices? Thats crazy. As others have said they are just ######. Time for big tech to bring down the prices for real not this fake crap.
    • The iFlyTek AINote 2 is among the thinnest E-Ink tablets. It has an EMR stylus, a built-in fingerprint reader, and plenty of built-in AI features. You had me until "and plenty of built-in AI features." That and any company that still does the iProduct naming trope is an immediate pass. It suggests the company isn't very imaginative or creative and is trying to piggyback off another company's success. Extremely lame. Also kind of expensive. Better choices at lower prices out there.
    • These are not "great" prices... just "less awful". Apparently "Those who forget the past are doomed to pay higher prices and think they've won."
  • Recent Achievements

    • Week One Done
      flexorcist earned a badge
      Week One Done
    • One Month Later
      Woland13 earned a badge
      One Month Later
    • Week One Done
      Woland13 earned a badge
      Week One Done
    • One Year In
      bernmeister earned a badge
      One Year In
    • Week One Done
      Scoobystu earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      486
    2. 2
      +Edouard
      220
    3. 3
      PsYcHoKiLLa
      147
    4. 4
      Steven P.
      74
    5. 5
      FloatingFatMan
      70
  • Tell a friend

    Love Neowin? Tell a friend!