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

    How to redirect hostname to certain IP/server

    Scheduled Pinned Locked Moved DHCP and DNS
    8 Posts 4 Posters 5.6k Views
    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.
    • A
      asura
      last edited by

      i have internet cybercafe and setup movie server on it.
      for example, 192.168.1.11 is for my movie server ip.

      client from pc1 will browse to www.movieserver.com to have a view.
      question is, how to redirect www.movieserver.com to ip 192.168.1.11?

      point is i want to hide server ip from showing up on browser address bar.

      ;)

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

        what are you using for dns on your network - pfsense?  If so just create a host override for that fqdn and point it to whatever IP you want.

        But if your trying to hide IPs from users - they must be really stupid users if you think they can not find IP of www.somedomain.tld

        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
        SG-4860 24.11 | Lab VMs 2.8, 24.11

        1 Reply Last reply Reply Quote 0
        • A
          asura
          last edited by

          i just learned from google. I need to configure DNS forwarder.
          thanks for ur kind reply. if i stuck somewhere i will get back here.

          i dont think they are too stupid. But im do this for some reasons.
          anyway ..thanks

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

            The dns forwarder is on by default I do believe in pfsense.  So nothing to configure other than the override there

            example from my home network, but you can put in anything you want there, I could have say www.google.com point to one of my private addresses if I wanted to.

            example.jpg
            example.jpg_thumb

            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
            SG-4860 24.11 | Lab VMs 2.8, 24.11

            1 Reply Last reply Reply Quote 0
            • A
              asura
              last edited by

              thanks a lot and i really appreciate ur reply ..

              mayb i can try put host, domain and ip as below
              HOST      DOMAIN                  IP
              www      .movie-server.com    192.168.1.11

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

                sure just like that - see I just pointed it to my .100 box

                example.png
                example.png_thumb

                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
                SG-4860 24.11 | Lab VMs 2.8, 24.11

                1 Reply Last reply Reply Quote 0
                • K
                  kchr
                  last edited by

                  If you want to do it quicker/for debugging purposes one could add lines like these to the Advanced config of the DNS forwarder (dnsmasq):

                  address=/www.google.se/192.168.0.1/
                  address=/ftp.debian.org/192.168.0.2/
                  address=/ads.double-click.net/127.0.0.1/
                  ...
                  

                  It's easier to maintain when doing tests but not that organized.

                  1 Reply Last reply Reply Quote 0
                  • J
                    joako
                    last edited by

                    @asura:

                    thanks a lot and i really appreciate ur reply ..

                    mayb i can try put host, domain and ip as below
                    HOST       DOMAIN                   IP
                    www       .movie-server.com     192.168.1.11

                    I am pretty sure for domain you would put "movie-server.com" without the leading "."

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post
                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.