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

    Smart TV using pfSense

    Scheduled Pinned Locked Moved General pfSense Questions
    20 Posts 6 Posters 1.9k 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 @zaffy
      last edited by

      @zaffy I am going to take a stab in the dark and guess your wanting to circumvent geo restrictions on streaming services. While sure you can easy policy route traffic of any client out a vpn you have setup per the link @NogBadTheBad provided.

      Keep in mind this may or may not work how you think it will. Have you validated it works on say a normal client first, ie you can watch what you want via the vpn connection?

      Many streamers block known vpn IPs - its a wack-a-mole sort of game.. So what your wanting to accomplish may or may not work, it may work today, but not tomorrow, etc.

      But sure its pretty easy to route traffic out a vpn via pfsense policy routing.

      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

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

        You will want to set the TV with a static DHCP lease in order it always has the same IP. And you probably want to pass it an external DNS server to use such as the VPN providers DNS server(s). Otherwise the DNS requests will appear to come from a different location and bad things will happen!

        johnpozJ 1 Reply Last reply Reply Quote 2
        • johnpozJ
          johnpoz LAYER 8 Global Moderator @stephenw10
          last edited by johnpoz

          @stephenw10 said in Smart TV using pfSense:

          different location and bad things will happen!

          Define bad for who? ;)

          If the streaming service blocks users trying to geo circumvent policy then that would be a good thing ;) For the streaming service.

          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 1
          • Z
            zaffy @johnpoz
            last edited by

            @johnpoz said in Smart TV using pfSense:

            @zaffy I am going to take a stab in the dark and guess your wanting to circumvent geo restrictions on streaming services. While sure you can easy policy route traffic of any client out a vpn you have setup per the link @NogBadTheBad provided.

            johnpoz, Thanks. Geo restrictions - Sure this is part of the objective but I would like to use this exercise to get to know pfSense a bit better and then to deploy it for my cameras and other devices so that it eventually will be come my main firewall/router. I can confirm that Geo restriction are lifted by the VPN so hopefully this idea will work too.

            1 Reply Last reply Reply Quote 0
            • Z
              zaffy @NogBadTheBad
              last edited by

              @nogbadthebad - Thanks for this. It looks like I will need a dual NIC box or have to get a managed switch to setup VLANs. My current switches are all unmanaged unfortunately.

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

                @zaffy you don't have to actually put the tv in a different network/vlan to use policy routing. You can route a specific IP out a vpn via policy route rule with just one lan network..

                Example:

                So my normal IP when going just out my normal ISP connection. Funny that same first octet ;) Then create a policy route for my PC IP, killed all the states for my pc so new connections use the new policy route. And see that my IP is now the IP of my vpn connection.

                policyroute.jpg

                Notice in the rule as well that you see traffic and states using the policy route rule the 18/4.87 MB

                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

                NogBadTheBadN Z 2 Replies Last reply Reply Quote 2
                • NogBadTheBadN
                  NogBadTheBad @johnpoz
                  last edited by

                  Just remember if you follow the NordVPN instructions tick don't pull routes, otherwise the default route for everything is NordVPN.

                  Screenshot 2023-01-18 at 15.26.59.png

                  Andy

                  1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

                  1 Reply Last reply Reply Quote 2
                  • Z
                    zaffy @johnpoz
                    last edited by

                    @johnpoz Appreciate this.

                    One thing though, when I installed pfSense it couldn’t find any LANs but only the WAN. This I believe is because I only have one NIC and all my devices are on the same network ( what pfSense calls a LAN) - they are all on 192.168.0

                    I can login to the web configurator on the IP address it assigned from DHCP.

                    Will I be able to setup a policy on a WAN only network ?

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

                      @zaffy said in Smart TV using pfSense:

                      Will I be able to setup a policy on a WAN only network ?

                      Huh.. Not going to route anything with only 1 network.. Pfsense is a "router" and firewall - to route, you need more than one network.. Not sure how you expect to route if you only have 1 network. You need another interface, or you need to have vlans - so pfsense can route between networks..

                      You might be able to do some sort router on a stick with pfsense only having the wan interface, and from their creating your vpn connection. And then pointing what you want to use the vpn to pfsense as its gateway..

                      But just get another interface.. Or a vlan capable switch and do it with vlans..

                      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 1
                      • stephenw10S
                        stephenw10 Netgate Administrator
                        last edited by

                        I guess the VPN would be another interface and it might technically be possible by passing different gateways to clients but.... that's a horrible setup!

                        1 Reply Last reply Reply Quote 1
                        • Z
                          zaffy
                          last edited by

                          I built a Linux box and installed Nord
                          Opened up the firewall for all of the relevant ports.
                          Set all outbound traffic to use the VPN.

                          Set the TV gateway to this box.

                          It seems to work well.

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

                            Yup, and you could do that using pfSense in the same way. However you could very easily hit asymmetry issues at some point down the line. And if that happens diagnosing it might be challenging as not all the traffic goes through the same gateway.

                            1 Reply Last reply Reply Quote 1
                            • bingo600B
                              bingo600 @zaffy
                              last edited by bingo600

                              @zaffy said in Smart TV using pfSense:

                              I built a Linux box and installed Nord
                              Opened up the firewall for all of the relevant ports.
                              Set all outbound traffic to use the VPN.

                              Set the TV gateway to this box.

                              It seems to work well.

                              I'm doing excactly the same for my ATV & WiFi-VPN's

                              I have a little i3 that runs Free VMware , and i have made 3 x 2-GB (Ram) virtual Linux instances for OpenVPN to ... "whatever".
                              The Linux runs DNS + DHCP + iptables & OpenVPN, and is basically a "selfcontained unit", just needing a "default gateway".

                              Make a separate (closed) Vlan for the virtual Linux VPN Box.
                              Connect Linux net interface + pfSense vlan interface to the Vlan , and set linux def-gw to point at pfSense IF.

                              In pfSense Deny any from Vlan network to RFC1918 , then allow any from linux ip to "any" (use pfS as def-gw)

                              If WiFi VPN , make a separate SSID , connect to the VPN Vlan , set linux DHCP to hand out linux ip as def-gw ... Done

                              I wanted the ease & flexibility from OpenVPN config files , to be able to point that VPN to "whatever" in a minute ... Not fiddling with pfSense OpenVPN config.

                              If i need to be "cloaked" .. I just point my lappy to one of the VPN SSID's , and the linux box handles the rest .... And i can switch to another VPN server, by just ssh'ing to the linux and start up another config file.

                              Avoiding DNS Leak , easiest is using 8.8.8.8 or 1.1.1.1 on the linux box.

                              If you wanted to use the VPN provider's DNS'es .. Some linux tweaking might be required.
                              As linux seems to remember the "boot dns" after the OpenVPN DNS'ses are handed down.
                              Resulting in it will remember/use both the boot DNS , and the VPN DNS'es
                              The boot dns might "leak" , if set to a local DNS , ie. pfSense

                              /Bingo

                              If you find my answer useful - Please give the post a šŸ‘ - "thumbs up"

                              pfSense+ 23.05.1 (ZFS)

                              QOTOM-Q355G4 Quad Lan.
                              CPUĀ  : Core i5 5250U, Ram : 8GB Kingston DDR3LV 1600
                              LANĀ  : 4 x Intel 211, DiskĀ  : 240G SAMSUNG MZ7L3240HCHQ SSD

                              Z JonathanLeeJ 2 Replies Last reply Reply Quote 1
                              • Z
                                zaffy @bingo600
                                last edited by

                                @bingo600
                                Some good ideas here for a future project - appreciated.

                                My current solution seems stable enough and was more of a proof of concept than anything else.

                                I’m going to source some dedicated fanless hardware and build a better solution for the entire house so I can access devices remotely via pfSense.

                                1 Reply Last reply Reply Quote 0
                                • JonathanLeeJ
                                  JonathanLee @bingo600
                                  last edited by

                                  @bingo600 could DoH cause problems with DNS in this situation also?

                                  Make sure to upvote

                                  bingo600B 1 Reply Last reply Reply Quote 0
                                  • bingo600B
                                    bingo600 @JonathanLee
                                    last edited by

                                    @jonathanlee
                                    Define problem ....

                                    But DOH isn't blocked by the linux box, if that's what you ask

                                    If you find my answer useful - Please give the post a šŸ‘ - "thumbs up"

                                    pfSense+ 23.05.1 (ZFS)

                                    QOTOM-Q355G4 Quad Lan.
                                    CPUĀ  : Core i5 5250U, Ram : 8GB Kingston DDR3LV 1600
                                    LANĀ  : 4 x Intel 211, DiskĀ  : 240G SAMSUNG MZ7L3240HCHQ SSD

                                    JonathanLeeJ 1 Reply Last reply Reply Quote 0
                                    • JonathanLeeJ
                                      JonathanLee @bingo600
                                      last edited by

                                      @bingo600 I mean that if you do not set up some controls for DoH that it could also cause issues.

                                      Make sure to upvote

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

                                        If some client was hard coded to use DoH then and local filtering/redirecting would not apply to it. However if would still be routed the same as any other traffic from that host so it should work OK.

                                        Steve

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