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

    Enable internet access from LAN

    Scheduled Pinned Locked Moved General pfSense Questions
    50 Posts 4 Posters 10.1k 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.
    • johnpozJ
      johnpoz LAYER 8 Global Moderator
      last edited by johnpoz

      @maale said in Enable internet access from LAN:

      My WAN interface IP is 104.x.x.x( subnet 104.x.x.x/24

      That is public space.. Where do these device point for dns? Again they would need to resolve your pfsense WAN IP via some fqdn.. Be it resolve in the dns they point to or publicly resolvable - or ok in their host file.

      Now you would have to do a port forward..

      Why do you have devices on public space that are local, but then have pfsense using rfc1918? You didn't just pull 104 out of thin air and start using it on your local network?

      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.7.2, 24.11

      1 Reply Last reply Reply Quote 0
      • M
        maale
        last edited by

        This is a school lab

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

          So pfsense wan IP is 104.x.x.y, for you to get to whatever is behind it when your also on the 104 network or anywhere on the wan side then you need to resolve whatever.domain.tld to this 104..x.x.y address... Be that public dns, be that some local dns you point to that resolves that for you, or host file on your machine.

          Once you resolve that fqdn to that IP... Then setup port forward on pfsense.

          https://docs.netgate.com/pfsense/en/latest/nat/forwarding-ports-with-pfsense.html

          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.7.2, 24.11

          M 1 Reply Last reply Reply Quote 0
          • M
            maale @johnpoz
            last edited by

            @johnpoz
            "then you need to resolve whatever.domain.tld to this 104..x.x.y address... Be that public dns, be that some local dns you point to that resolves that for you,"

            So I have added host overrides to my local DNS resolver, does that can work?
            2f6be96d-628b-41bd-9b73-23cbbd0b036b-image.png

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

              And are you using the resolver - do your boxes on 104 even have access to pfsense wan IP on dns?

              Show me your query.. You did a dig, a host you used nslookup - what.. Did you open udp/tcp on your wan for your clients on 104 to be able to query this 104.x.x.y address for 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.7.2, 24.11

              1 Reply Last reply Reply Quote 0
              • stephenw10S
                stephenw10 Netgate Administrator
                last edited by stephenw10

                The port forwards, like the firewall rules, are parsed from the top down.

                You have a rule that forwards port 443 to the LAN IP address (192.168.1.1) above the rule for 192.168.1.5 so nothing can ever hit that.

                Please show us a current port-forward list if you have made changes since.

                Steve

                M 1 Reply Last reply Reply Quote 0
                • M
                  maale @stephenw10
                  last edited by

                  @stephenw10
                  ok, This a query using dig while using the DNS resolver of pfsense

                  a8b53193-f087-4bfe-90df-0bfb5847009f-image.png
                  And this is WAN rules, and NAT

                  7e9d3e79-bef6-4179-b194-9b1f8eeaefbe-image.png
                  380050c4-7bb7-4bee-92c4-cb38ed8cb179-image.png ,
                  Those internal machines are virtual machines that I have built them behind the pfsense. Do I need also to build the external machines for the external IPs?
                  for the web and the email server?. I have built an external vm with and IP:104.x.x.z from this machine I can ping the pfsenseWAN address.

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

                    And how exactly is this 104 box doing a query to 192.168.1.1... Their default gateway is pfsene wan IP...

                    You show zero hits on any of your wan rules..

                    How about you draw up how you have this put together... Cause I don't see how devices on a 104 school network would be pointing to pfsense wan as their gateway.. Or how they would query a rfc1918 address for dns.

                    If anything would be a asymmetrical mess..

                    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.7.2, 24.11

                    1 Reply Last reply Reply Quote 0
                    • stephenw10S
                      stephenw10 Netgate Administrator
                      last edited by

                      Ok, the port forward rules and linked firewall rules look good though.

                      Where are you testing it from? What IP? I assume that 104.x.x.x IP is the schools external public IP, not the pfSense WAN?

                      Test from something on the pfSense WAN subnet to the pfSense WAN IP address directly and it should work.

                      Steve

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

                        According to him the 104.x.x.x/24 is his pfsense wan.. And yeah its his school network..

                        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.7.2, 24.11

                        1 Reply Last reply Reply Quote 0
                        • stephenw10S
                          stephenw10 Netgate Administrator
                          last edited by

                          Ah, yes. Ok then test from that subnet to the IP directly, with those rules it should connect.

                          1 Reply Last reply Reply Quote 0
                          • M
                            maale
                            last edited by

                            Thanks

                            Still doesnot work, I tested it from an external builted vm machine with IP 104.x.x.15 with gate way =104.x.x.254, although I can ping the external mail server address:104.x.x.35 but cannot connect to it!!!
                            8e4464c6-ed66-414e-b010-fc5db5532498-image.png
                            2b0dae74-55d8-4122-859a-c97defdec55f-image.png

                            could you please let me know what can be the problem?

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

                              There is all kinds of things that could be the the problem.. That just means your pinging something 104.x.x.35... Why would you think that would be your mail server if its behind pfsense, is that pfsense wan IP.

                              Which I doubt - since from you rules on your wan your not allowing to ping its wan ip.. Or any icmp even, so highly much doubt that is even psfense.. And sure isn't something behind it, etc. etc..

                              If you want help - I suggest you get with your teacher.. I'm not here to teach a class in basic networking, so you can get an A..

                              To troubleshoot port forwarding.
                              https://docs.netgate.com/pfsense/en/latest/nat/port-forward-troubleshooting.html

                              But again, from what you posted I highly doubt that .35 is even pfsense wan IP... Since you do not allow that on your wan interface - so you wouldn't get an answer if you pinged it..

                              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.7.2, 24.11

                              1 Reply Last reply Reply Quote 0
                              • stephenw10S
                                stephenw10 Netgate Administrator
                                last edited by

                                I agree. If you're genuinely testing from the WAN subnet and the pfSense WAN IP is 104.190.x.35 then your firewall rules should be blocking that ping.

                                So either you're pinging something else or you changed the rules since you last screenshot.

                                Steve

                                M 1 Reply Last reply Reply Quote 0
                                • M
                                  maale @stephenw10
                                  last edited by

                                  @stephenw10
                                  yes I have only changed the WAN rules to alow ICMP.
                                  064cb4aa-c5fa-4104-acff-9db37f1b69ec-image.png .
                                  thanks

                                  1 Reply Last reply Reply Quote 0
                                  • stephenw10S
                                    stephenw10 Netgate Administrator
                                    last edited by

                                    Ok, what ports do you have in the web alias?

                                    M 1 Reply Last reply Reply Quote 0
                                    • M
                                      maale @stephenw10
                                      last edited by

                                      @stephenw10
                                      26f951e2-b552-4c1a-a3af-87d8bbb7ea29-image.png

                                      1 Reply Last reply Reply Quote 0
                                      • stephenw10S
                                        stephenw10 Netgate Administrator
                                        last edited by

                                        Ok it looks like your port forward for that server is listing at 104.x.x.5 but you are trying to open 104.x.x.35.
                                        Is that just a typo? Correct it if so.

                                        If it's a VIP on the WAN then try to open that IP.

                                        Steve

                                        M 1 Reply Last reply Reply Quote 0
                                        • M
                                          maale @stephenw10
                                          last edited by

                                          @stephenw10
                                          I have 2 servers, one is web sever has external IP 104.190.X.X.5 and internal 192.168.1.5, second is mail server has external IP 104.X.X.35 with internal IP 192.168.1.5, I want both be behind pfsense and accessible from outside through port forwarding
                                          3118887d-69a1-4875-8d1f-ac7aaea1b662-image.png
                                          yes I have virtual IPs
                                          sorry, what do you mean by opening that IP?
                                          do you mean set a LAN rule with destionation address =104.x.x.5 ?

                                          M 1 Reply Last reply Reply Quote 0
                                          • M
                                            maale @maale
                                            last edited by

                                            @maale
                                            Sorry, I mean a WAN rule

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