Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
Shay_ca
New Contributor

Accessing Network Shares over VPN by name instead of IP

Hello,

 

When we connect to the VPN out of office, it connects just fine. We can only get to the network shares by entering \\192.XXX.XXX.XXX instead of how we could do it in the office \\FILESHARE

 

How can we get it so the VPN will take the network path name instead of just the IP address?

 

We have a fortinet 300D if that makes a difference.

9 REPLIES 9
ede_pfau
SuperUser
SuperUser

hi,

and welcome to the forums.

 

Apparently, your DNS is not configured correctly on the client. First of all, are we talking about IPsec VPN or SSLVPN? So which DNS have you set? Your HQ DNS will probably be able to resolve a local hostname to a (private) IP address, like in "ping myserver".

Now you would want to use the HQ DNS if connected via VPN but not if running in standalone mode. You can configure DHCP over IPsec which not only assigns a (private) IP address to the client but changes the DNS to use as well.

 

It may as well be that you use the internal DNS on the client, but the client doesn't append your local domain name.

Finally, it would make much sense to read up on Windows name resolution (via DNS, NetBIOS, local hosts file) to craft a solution.

Ede Kernel panic: Aiee, killing interrupt handler!
Ede Kernel panic: Aiee, killing interrupt handler!
Ralph1973

You need to add dns suffix to your client vpn address assignment, like

config vpn settings

set dns-suffix companyname.local

 

Regards,

Ralph

Shay_ca

I got it resolved using these in CLI:

[ul]
  • config vpn ipsec phase1-interface
  • edit <name of VPN>
  • set domain <AD domain>
  • set ipv4-dns-server1 <ip of DNS server>
  • end[/ul]

    Running each of those with the correct info made it work for us. Not sure why this info is not available anywhere online. Hope it helps someone in the future.

     

  • ede_pfau

    ...and the DNS resolves local names, right?

    Ede Kernel panic: Aiee, killing interrupt handler!
    Ede Kernel panic: Aiee, killing interrupt handler!
    Shay_ca

    ede_pfau wrote:

    ...and the DNS resolves local names, right?

    yes worked perfectly after running those commands with our information in the CLI window.

    ahmed41

    Shay.ca wrote:

    I got it resolved using these in CLI:

    [ul]
  • config vpn ipsec phase1-interface
  • edit <name of VPN>
  • set domain <AD domain>
  • set ipv4-dns-server1 <ip of DNS server>
  • end[/ul]

    Running each of those with the correct info made it work for us. Not sure why this info is not available anywhere online. Hope it helps someone in the future.

     

  • Thanks for your help

    I didn't try this command because it is supposed I configured it while i'm creating the IPSec VPN :-

    for domain: I have no domain I'm working in workgroup environment 

    - for DNS : while I set the VPN connection I cose to use the system DNS (of Fortigate) I don't want to put custom DNS server IP for a reason.

    System is using fortiguard DNS.

    I don't know where is the problem and why I can't access shared files in the remote network by name instead of IPs 

    rwpatterson
    Valued Contributor III

    ahmed41 wrote:

    - for DNS : while I set the VPN connection I cose to use the system DNS (of Fortigate) I don't want to put custom DNS server IP for a reason.

    System is using fortiguard DNS.

    I don't know where is the problem and why I can't access shared files in the remote network by name instead of IPs 

    Here is the sum of your issue. The Fortigate DNS does not know the names of your private servers on the far end of the tunnel. The only way to resolve this is to allow the users access to the private DNS server that contains the names of the private servers OR use a host file on the workstations that need to access names across the tunnel. The host solution is not ideal because you would have to edit each machine every time a change is made to that remote DNS database.

    Bob - self proclaimed posting junkie!
    See my Fortigate related scripts at: http://fortigate.camerabob.com

    Bob - self proclaimed posting junkie!See my Fortigate related scripts at: http://fortigate.camerabob.com
    ahmed41

    I'm trying 

    [ul]
  • set ipv4-dns-server1 <ip of DNS server>[/ul]

    It says command fail return code -61

     

    any help please? 

    V 5.2

  • nawin
    New Contributor

    Hello Ahemed,

     

     

    You need to enable DNS-Mode as manual. By-default it is in auto mode.

     

     

    Regards

    Naveen.D

    nawindara
    nawindara
    Announcements

    Select Forum Responses to become Knowledge Articles!

    Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.

    Labels
    Top Kudoed Authors