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

    use public ip in the lan network

    Scheduled Pinned Locked Moved Routing and Multi WAN
    12 Posts 4 Posters 998 Views 4 Watching
    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.
    • emammadovE Offline
      emammadov
      last edited by emammadov

      Hello. You can use Pure NAT.
      https://docs.netgate.com/pfsense/en/latest/book/nat/nat-reflection.html

      Elvin

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

        @vettalex said in use public ip in the lan network:

        The need is to use the public IP and the port even when you are inside the company

        Why? Just setup a host override to resolve what fqdn your public IP resolves to the internal IP.. Only the shittiest of crappy applications would hard code an IP be it public or private...

        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

        V D 2 Replies Last reply Reply Quote 0
        • V Offline
          vettalex @emammadov
          last edited by

          @emammadov thanks I solved it ... very kind

          1 Reply Last reply Reply Quote 0
          • V Offline
            vettalex @johnpoz
            last edited by

            @johnpoz hello, even if I solved it, I wanted to deepen your solution. Can you give me more info so I can study it? thank you very much

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

              So you have some fqdn, lets call it service.domain.tld the resolves on the public internet to say 1.2.3.4

              You see traffic to port X on 1.2.3.4 and you forward it to 192.168.1.100..

              This works great on the outside of your network.. For clients inside your network.

              Just create a host override for service.domain.tld that points to 192.168.1.100

              Now when clients inside your network, using your dns they would just resolve service.domain.tld to 192.168.1.100, no need for nat reflection.

              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
              • D Offline
                Dunno @johnpoz
                last edited by

                @johnpoz In Finland it costs couple bucks to get private IP on Mobile Broadband in the super overflowed network which speed is around 5/5 Mbps with a huge ping. 3 bucks server with 1Gbps port and public IP is a cheap and much better choice with less ping. You cannot have a wired connection with public IP on a sparsely populated area here in Finland. Maybe not the best practice but as long as it works it serves the purpose. I have the same kind of issue with PfSense but I'd more likely set PfSense with a redirect to internal IP rather than use Hamachi.

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

                  Huh? What does that have to do with split dns?

                  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

                  D 1 Reply Last reply Reply Quote 0
                  • D Offline
                    Dunno @johnpoz
                    last edited by

                    @johnpoz Stop being a dick anyway.

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

                      Huh?

                      Your statement makes no sense in relation to the topic at hand.. It doesn't - so I'm a dick?

                      Maybe you posted in the wrong thread?

                      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

                      D 1 Reply Last reply Reply Quote 0
                      • D Offline
                        Dunno @johnpoz
                        last edited by

                        @johnpoz Might be that I misunderstood concept. I apologize if I did. I don't still find any reason why not to do that in "crappiest shit" applications. I just find your comment negative and my honest opinion is that it does not suit you ๐Ÿ‘

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

                          Hard coding an IP into an application is BAD... Its crappy design no matter how you look at it.

                          What happens when that IP changes.. Now the application has to be changed.. If the application used a fqdn to talk to whatever it is it needs to talk to.. All that has to happen is that fqdn points to whatever IP this services it running on.. It could change daily for that matter, etc.

                          The only scenario where you would have to use nat reflection is when the application in use is hard coded to that specific public IP.. Which would be a crappy designed application ;)

                          edit: Its possible the OP doesn't even have a fqdn that points to this public IP.. You can get a ddns fqdn that points to your public IP for "free".. so then just use the fqdn vs the IP, and again the need for nat reflection goes away.. If this is business use, you can get a domain for like $10 a year.

                          I stand by my opinion - if your using IP vs a fqdn to access pretty much anything its crappy design..

                          edit: Here you go - the person that uses hard coded IPs in an application vs fqdn.. Prob the same person that would design something like this

                          firealarm.png

                          ie they didn't think it through = crappy design ;)

                          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
                          • First post
                            Last post
                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.