Accessing server by hostname



  • Hello all,
    I've posted here before, and everything was working fine until I re-installed my OS. I have pfsense setup with OVPN and a server at home.

    I connect to my vpn and then I'm able to access RDP and my home network. However, after I re-installed my OS and OVPN it's not the same anymore.

    Before when I connected, I was able to connect to network shares and my rdp connection by using the host name (xyserver). Now in order to connect to rdp i had to modify the rdp file to connect to an IP address. This is only true when I'm connected to the VPN and not when I'm on the actual network. Also when I'm connected through the VPN i'm not able to access my shares at all. weather i put in the host name of the server or the ip address, it always tells me that it can't find the name. Again when I am connected directly to that network (when i'm home) i have no issues. I have not made any changes to the firewall or the pf sense box at all.

    the only thing that has changed is that when i re-installed the OS, i re-installed the OVPN software, and basically copied the install folder from my old hard drive, so i overwrote the installation. I didn't think this would cause an issue.

    could anyone please shed some light on this? it's kind of pointless having a vpn if you can't access files on your server.

    Thank you in advance.


  • Rebel Alliance Developer Netgate

    If you have the OpenVPN server push the LAN IP of the firewall to the client as a DNS server, it should work.



  • @jimp:

    If you have the OpenVPN server push the LAN IP of the firewall to the client as a DNS server, it should work.

    are you talking about a client specific setup in vpn?


  • Rebel Alliance Developer Netgate

    No, in the OpenVPN server settings one of the choices is DNS servers to supply to the client (assuming you're using PKI…)



  • @jimp:

    No, in the OpenVPN server settings one of the choices is DNS servers to supply to the client (assuming you're using PKI…)

    Ok, got that..i enabled it and now i can access a share, i have to put in the actual ip address instead of the hostname…the hostname still gets unresolved.

    is there a setting to fix this issue as well?


  • Rebel Alliance Developer Netgate

    If the DNS server gets passed to the OpenVPN client, and that DNS server can resolve the hostnames you want, it should all just work.



  • @jimp:

    If the DNS server gets passed to the OpenVPN client, and that DNS server can resolve the hostnames you want, it should all just work.

    ok…so i enabled client-to-client vpn and that allowed me to access shares...but i still can't access shares with a hostname...



  • That's down to WINS I suspect. You can either use the name that's in DNS, or you can ensure you have a WINS server on your LAN and that you push it to your OpenVPN clients.



  • I have a mixed network with mostly Windows machines, a Mac, and a few Linux boxes. There is no DNS or WINS server, and adding one is outside of my control. If I put a clean install of 10.04 desktop on a computer, then all other machines on the network can get to that machine by hostname just fine. However, if I put 10.04 server on the same computer, then the other machines can only get to it by IP address. The hostname does no



  • That means you have something on your network doing name resolution, it could be any one of a number of things (DNS, WINS, Bonjour/Zeroconf) and there isn't enough information to know exactly which. I'm guessing that when you install your Ubuntu 10.04 desktop it's installing a package that enables the registration of it's hostname in that service, and that package isn't installed by default with Ubuntu server.

    What versions of Windows do you have (eg Windows XP Pro) and what version of MacOS? Does the access by hostname work from the Windows and the MacOS hosts, or just the Windows hosts?



  • To access the hosts you need HOSTNAME + DOMAINNAME

    Hostname: PC1
    Domain. Mydomain.com

    PC1.Mydomain.com

    If you do not want to enter the domain name, you have to enter this domain name on your clients netzwork config tool.



  • I'm only running windows machines…xp, 7, 2003 server...no mac or linux



  • Do not know all english expressions therefore I better let talk pictures.
    You need to enter this domains on all the clients from where you want to establish the connection by hostname. I think in a windows domain you could use GPOs for that.



Log in to reply