How to secure pfSense when behind a public IP with open ports? Plus some VLAN doubts.


Recommended Posts

So I recently built a home server running Windows 10 Pro and Hyper-V. I initially went with OPNsense, but have now switched to pfSense. Documentation for OPNsense is pretty thin, and so are guides online. Whereas pfSense information is abundant. So anyway, I've got it up and running in Hyper-V, and all my devices are getting internet and LAN access as well as able to push Gig.

 

Now the thing is, I'm on Carrier Grade NAT. I learned that this is what it is called recently while I have been tearing my hair out to get stuff to work for external access. Turns out, I cannot. Well, not in a straight forward way at least. Some guides do mention using a VPS running a VPN, or SSH tunneling, but my networking knowledge is limited, so don't want to go down those roads. So since I have a double NAT (and I cannot put the ISP hardware in bridge mode like many guides online suggest), my only option is to pay my ISP for a public IP. Which I intend to do in the near future.

 

So how do I secure my network for this? I want to be able to run OpenVPN, NextCloud, AirSonic and maybe Plex with external access for all. I don't intend to host my website from home as it is too risky. That will remain on professional hosting. I have professional email with GSuite, and want that to continue as well. Can I point my domain to my home server for Plex, NexCloud etc, while still having externally hosted website and email? Ideally I would like to have plex.mydomain.com, nextcloud.mydomain.com, etc.


I also plan to buy a managed switch next year sometime for segregating traffic using VLAN's. But I have some doubts regarding this. I am totally new to this. How do I segregate wireless traffic? Will I need to buy new Access Points? I've seen hardware from Ubiquiti highly recommended online by many people, but they are bloody expensive here! They start at the equivalent of $150, which is way too much for me at least. I would ideally like to have some wireless clients with unrestricted access and some with only internet and not LAN access. For wired, I think I understand how VLAN's work. I have to create a VLAN, assign it to a port on the switch, and then connect whatever device I want on that port, which will get the alternate IP address specified for that VLAN.

Since you will only have one public IP address, all that you would need is one sub-domain, something like home.yourdomain.com, pointing to your home IP address.   Everything else from there is split out via port forwarding to the correct IP addresses within your network.  With a managed switch and a wireless AP that supports VLANs, you can segregate traffic easily, but you can also segregate traffic by IP address firewall rules and source route firewall rules.

 

Peplink makes some great wireless AC access points that support vlans and multiple SSID's:  https://www.amazon.com/Peplink-Pepwave-One-mini-APO-AC-MINI/dp/B00PJSGG1K/ref=sr_1_fkmr0_1?ie=UTF8&qid=1546256074&sr=8-1-fkmr0&keywords=peplink+wireless+ac

 

I would definitely recommend reading up and learning more about port forwarding, firewall rules and vlans as it can get quite complicated very quickly depending on how you do your setup.

 

 

  • Like 1

Ah crap, so I do ideally need an AP that supports VLAN's. That Peplink one you linked to is also quite expensive actually. Almost as much as a Ubiquiti. Also, don't think it is available in India. Importing from abroad is not an option as the shipping is too high. Customs may slap on duty as well. Segregating through firewall...not very familiar with it. My networking isn't great, but do want to learn! Also, totally new to the whole running your own router scene. I've been using an off the shelf router all these years.

 

Ok, but I don't really see the benefit of home.mydomain.com as I'm not running a website. Correct me if I'm wrong. I ideally want to be able to have NextCloud, Plex etc as separate domains so that I can just hit them up as and when from anywhere. Looks more impressive too! :laugh:

 

Yup, I'm still reading up on all this. Not going to invest in hardware without knowing much more. As of now my setup is quite simple, although with quite a lot of devices. But yes, it is going to get complicated once I have all these services up and running.

It just struck me...couldn't I plug in a standard WiFi AP into a VLAN tagged port on a managed switch and have a segregated network that way? Of course, that is one additional AP just for restricted access.

I have the previous model the SG300 from cisco, 28 port and 10 port model love them..  So yeah that would be a good choice for a switch.. While its not the full IOS command listing.. If you know cisco then you will have no issues, and the gui from the 300's are nice - I have to assume its the same gui interface on the 350's

 

If you use different AP for your different vlan/networks then sure your AP does not need to support vlans.  But take a look at the unifi line very reasonable pricing with full feature sets, POE and support vlans... You can even do dynamically assigned vlans to your clients, etc. etc..

 

Once you get yourself exposed to public, ie not behind a CGN... Oh yeah that sucks!!  I allow friends and family to use my plex server, its as simple as forwarding the port.. But I limit it to their source IPs - so only they can directly access my plex.. If they are not on their IPs then they have to use the plex indirect mode.. Plex doesn't really need port forwards inbound to share, but if you don't your limited of bouncing your traffic off the plex servers which limit bandwdith.

 

As to openvpn - its pretty freaking secure ;)  So no issues with exposing that to be honest.. Use TLS auth and encryption as well and will keep some noise out of the logs.

 

Keep in mind who is exactly going to be accessing this stuff?  If just you and or your devices - you can always just vpn in then you can access your services you want, nextcloud, plex, etc. All through the secure vpn..  For example if I want to stream music/video from my plex server while on the road I just vpn in to my network and then not doing indirect off plex.

 

But yeah its a good idea to isolate all your iot stuff on their own vlans, and sure anything that is accessed from the public should be isolated in different vlan than your trusted stuff.

 

Once you get your switch and you have questions just ask... Glad to see you wised up about that distro that will not be named by me ;)

  • Like 1

Good to hear BudMan! Access to all this is mostly going to be me and wife. Kids and parents will be just Plex. On a fast, but capped connection, so not going to be giving Plex access to friends, except maybe for a NextCloud share for ocassionally exchanging files. NextCloud will also be used for exchanging files with clients for work.

 

Great, will just use a separate regular AP then! Ubiquiti is way too expensive here like I mentioned. Equivalent of $150 for a Lite AP! Whereas a regualr 802.11 ac device is less than $20. Sure, it doesn't do gig, but don't need anyway, as devices connected to them will be wireless. I've already got 2 AP's that will keep serving unrestricted in the whole house. Will need just 2 more for restricted WiFi. Will also use the restricted traffic AP's with Captive Portal for guests.

 

Question. If you can VPN into your home network, why do you use Plex? Couldn't you just play files directly from a file explorer? Unless your Plex server transcodes to save bandwidth.

 

Also, I read online that these Cisco switches are EOL. That's one reason they are cheaper than other switches. So is this something I need to be concerned about? From what I've read, companies have moved on from them for various reasons, but mine is strictly home usage. And a lot of people on Reddit say that they are still fantastic for home use. But I don't intend to upgrade this switch for the next like 10 years. 10 Gig LAN is still ###### expensive to implement in a home environment. Plus, I personally don't foresee myself needing it for many years to come. So this switch should be fine right?

The 350 are not end of life.. Where did you read that?

 

I stream from plex because it gives me a library interface.. Vs a folder of files in it.. ;)

3 hours ago, BudMan said:

The 350 are not end of life.. Where did you read that?

 

I stream from plex because it gives me a library interface.. Vs a folder of files in it.. ;)

I think it was on Reddit in r/homelab. Or maybe somewhere else. Looks like either I read it wrong or the person saying it was wrong. The Cisco website says this model was released in 2016. So looks like I'm good then! :cool:

I've put in a request with my ISP for a static IP. These guys have become extra smart, now want to charge me for it on a subscription as opposed to a one-time payment just a couple months back when I had last asked them! :angry::angry:

This topic is now closed to further replies.
  • Posts

    • Why it's almost impossible to produce a smartphone in the United States by Hamid Ganji If you look at the back of some Apple products, you can see the famous phrase “Designed by Apple in California, Assembled in China.” This phrase appears on products from one of the largest smartphone brands in the United States. These products are designed in the U.S., but their manufacturing takes place in China, India, Vietnam, or even Brazil. But why can’t Apple, as one of the largest American tech companies, produce its iPhones on U.S. soil? The idea for this topic came to me after the Trump Foundation launched a smartphone called the T1 and claimed that it was designed and built with American values in mind. However, this claim did not last long, as it was revealed that Trump’s phone was actually a rebranded HTC U24 Pro, with only a gold case and minor internal component changes. You see? Even a phone that is supposed to represent American values is manufactured in China. With a gross domestic product (GDP) exceeding $32 trillion, the United States is currently the world’s largest economy, while China ranks second with around $20 trillion. On the other hand, the United States is by a wide margin the global leader in various technological fields, and American companies spend hundreds of billions of dollars annually on research and development. From Apple and Google to Microsoft, Lockheed Martin, Boeing, and others, American tech and industrial giants lead their foreign competitors in many sectors. The United States also has no shortage of smartphone brands. Apple, Google, and Motorola are among the major brands in the smartphone market, collectively holding a significant share. However, the vast majority of their products are manufactured outside the United States. So why is it that the world’s largest economy, home to the most advanced technology companies and industrial powers, cannot produce a smartphone on its own soil? Let’s explore this question together. Even threats to impose tariffs won’t work After Trump entered the White House as the 47th President of the United States, his administration adopted strict tariff policies. One of these policies was the imposition of a 25% tariff on smartphones manufactured outside the United States. Trump said he “had a little problem” with Apple CEO Tim Cook over producing smartphones outside the U.S. So he thought that threatening a 25% tax on imported phones might force Apple to bring manufacturing back to the United States. “I have long ago informed Tim Cook of Apple that I expect their iPhones that will be sold in the United States of America will be manufactured and built in the United States, not India, or anyplace else,” Trump wrote on Truth Social. Image via The White House Although Apple currently manufactures some of the iPhone’s chips in the United States with TSMC's help, it still shows no willingness to shift full iPhone production to the country. At the time, renowned Apple supply chain analyst Ming-Chi Kuo wrote on X, “In terms of profitability, it’s way better for Apple to take the hit of a 25% tariff on iPhones sold in the US market than to move iPhone assembly lines back to the US.” However, manufacturing a smartphone in the United States is not as easy as it might seem, and many technical and economic barriers are involved. The lack of necessary manufacturing hubs There is a clear reason why many companies prefer to manufacture their products in China. China has established itself as the main global manufacturing hub for international companies, and over the past few decades, large contract manufacturers have emerged there, allowing companies like Apple to outsource production. One such example is Foxconn, which also manufactures some Apple products in India. Building the infrastructure required to produce smartphones in the United States would require tens of billions of dollars in new investment. Factories would need to be built, essential manufacturing equipment would have to be installed, and, most importantly, a skilled workforce capable of operating these systems would need to be recruited and trained. The United States currently lacks the core infrastructure needed to manufacture smartphones, and for this reason, many companies prefer to outsource production to Chinese contractors rather than spend tens of billions of dollars to build that infrastructure, which is significantly more economically efficient. Additionally, building such infrastructure in the United States could take up to a decade, ultimately leading to a significant increase in the product's final price for consumers. Shortage of trained labor in the U.S. compared to China Decades of serving as a global manufacturing hub have allowed China to build a massive talent pool in the production sector that is almost unmatched worldwide. Today, if a company chooses to manufacture its products in China, it can be confident that the workers involved in production have years of experience in their respective roles and are capable of producing high-quality goods with minimal errors. Even if we assume that tens of billions of dollars were invested in building smartphone manufacturing infrastructure in the United States, finding skilled workers would remain highly challenging. Apple CEO Tim Cook visiting the iPhone 6 assembly line in China in 2014. Image: Tim Cook on X In a 2015 interview on CBS’s 60 Minutes, Tim Cook said the main reason Apple isn’t producing in the US is a lack of skills. "China put an enormous focus on manufacturing, in what you and I would call vocational kind of skills. The US over time began to stop having as many vocational kinds of skills. I mean you could take every tool and die maker in the United States and probably put them in the room that we're currently sitting in. In China you would have to have multiple football fields,” Cook said. Also, in 2017, at the Fortune Global Forum in Guangzhou, Cook once again emphasized the importance of highly skilled Chinese workers. “China has moved into very advanced manufacturing, so you find in China the intersection of craftsman kind of skill, and sophisticated robotics and the computer science world. That intersection, which is very rare to find anywhere, that kind of skill, is very important to our business because of the precision and quality level that we like. The thing that most people focus on if they’re a foreigner coming to China is the size of the market, and obviously, it’s the biggest market in the world in so many areas. But for us, the number one attraction is the quality of the people,” Apple CEO said. Higher labor costs in the United States Producing almost any product in the United States is more expensive than in many other countries, and one of the main reasons is the higher cost of labor in the U.S. According to the Bureau of Labor Statistics, median weekly earnings of full-time workers in the United States were $1,235 in the first quarter of 2026. Meanwhile, the average annual salary in China's private sector in 2025 was RMB 71,590 (US$9,961). In many parts of the world, the weekly wage of an American worker is equivalent to several months of income. Another important factor to consider is that in the United States, the workforce capable of working on a smartphone assembly line is highly specialized and therefore commands higher-than-average wages. According to an estimate by Bank of America, producing an iPhone in the U.S. is technically possible, but “iPhone cost can increase 25% purely on higher labor cost in the U.S.” However, this 25% increase applies only if final assembly is performed in the United States while components are still sourced from China or elsewhere. In this case, the price of a base iPhone would rise from $799 to around $1,000. But in another scenario, if Apple were to produce the required components for the iPhone within the United States, production costs could increase by more than 90%. Trump’s dream for a “Made in the USA” iPhone might never come true In a free-market capitalist economy, one of the primary responsibilities of any CEO is to maximize profit. Using Apple as an example, Tim Cook’s role is to maximize the company’s profits so that it can fund research and development for new products and invest in areas such as artificial intelligence, while also keeping shareholders satisfied. Therefore, it is entirely understandable that Apple would choose not to bring its manufacturing back to the United States and instead keep production in countries where labor is cheaper, and products can be manufactured at a lower cost, thereby maximizing its profit margins. What is your opinion about manufacturing smartphones in the United States? If you are an American citizen, would you be willing to pay hundreds of dollars more for a smartphone made domestically in the USA? Let us know in the comments.
    • Cheers everyone for the replies. It's been very useful. 👍
    • Compared to the 7735HS it is around 25-30% slower in multi-threaded tasks (according to Google search) I did a review of the 7735HS Beelink SER6 Max in 2023, but thinking about it, it's not comparable to the 7730U. For the example you gave about how it will be used, the 7730U is actually an excellent choice for its power and battery efficiency.
  • Recent Achievements

    • Reacting Well
      JuvenileDelinquent earned a badge
      Reacting Well
    • One Month Later
      Excellence2025 earned a badge
      One Month Later
    • Week One Done
      Excellence2025 earned a badge
      Week One Done
    • Week One Done
      flexorcist earned a badge
      Week One Done
    • Week One Done
      Woland13 earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      503
    2. 2
      +Edouard
      194
    3. 3
      PsYcHoKiLLa
      151
    4. 4
      Steven P.
      71
    5. 5
      FloatingFatMan
      67
  • Tell a friend

    Love Neowin? Tell a friend!