Navigation

    Netgate Discussion Forum
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search

    How to reach a local-only apache via centralized example.com

    DHCP and DNS
    4
    4
    860
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jasonbevan last edited by

      Hello, Im trying to setup 10 internal (local only) domain names to point to a local web server hosting 10 sites.
      example:
      server ip 192.168.10.10 (hostname: webserver1) has /var/www/site1,site2,3,4,5 etc…I would like for anyone behind the firewall to be able to access each by their own name like site1=xxx.com site2=yyy.com... no need to be reachable from outside.

      I've tried doing it from an individual client by setting up the hostname to point to the apache ip/port but I will need this to work from a centralized place in order to server everyone that logs in to the network, I've tried following some of the help in this forum like with pfsense DNS forwarder, dnsmask etc but have been unsuccessful... Im not very knowledgeable in this area so any help would be appreciated!

      Thanks

      1 Reply Last reply Reply Quote 0
      • N
        NOYB last edited by

        Are the clients using pfSense or something else for DNS.  If the clients are using pfSense DNS just add host overrides.

        1 Reply Last reply Reply Quote 0
        • Derelict
          Derelict LAYER 8 Netgate last edited by

          Well, set it up then do DNS testing from the client trying to access the server.

          dig and drill are your friends

          drill @pfsense_local_interface_address www.example.com a

          drill @192.168.10.1 webserver1.example.com a

          What is returned?

          You can use nslookup if you must.

          Use a DNS troubleshooting tool when troubleshooting DNS issues. Not ping or a web browser. They don't give you the information you need, nor can you specifically target your lookups and bypass any local operating system or application caching.

          Chattanooga, Tennessee, USA
          The pfSense Book is free of charge!
          DO NOT set a source port in a port forward or firewall rule unless you KNOW you need it!
          Do Not Chat For Help! NO_WAN_EGRESS(TM)

          1 Reply Last reply Reply Quote 0
          • johnpoz
            johnpoz LAYER 8 Global Moderator last edited by

            what does your host override look like?

            if I want webserver1.example.com to resolve to internal IP.. its simple override.  Does not matter if forwarder or resolver as long as you put it in the one your actually using - they are the same from how host overrides work point of view.. But if your using the forwarder and you put the override in resolver - not going to work, or if vice versa

            And as Derelict so correctly states using an actual dns tool to query is going to be way more informative than simple ping or browser - both of which could be using cache, etc..  And do not report on info like exactly what server you did the query against and what the TTL might be, etc. etc..




            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            2440 2.4.5p1 | 2x 3100 2.4.4p3 | 2x 3100 22.01 | 4860 22.05

            1 Reply Last reply Reply Quote 0
            • First post
              Last post