Windows Subsystem for Linux – Ubuntu

If you are on Windows 10, you should probably give a try to Windows Subsystem for Linux. Getting a bash shell under Windows was not a trivial task back in the day.

Now you just head to the Microsoft Store and install one. There are variety of distributions to choose from ranging Debian, Ubuntu, Open SUSE and even Kali.

My preference is Ubuntu but wait there are 3 of them! This is quite confusing isn’t it?

Well I’ve finally found a reasonable explanation in this article: There Are Now Three Versions of Ubuntu in the Microsoft Store, Here’s Why

So if you need the latest and greatest LTS version simply install Ubuntu. For the moment my choice lays with Ubuntu 16.04 because of some application compatibility that is missing in 18.04 with weasel-pageant.

Sharing a Port with OpenVPN and a Web Server

Sharing a Port with OpenVPN and a Web Server

Routing your entire internet traffic over VPN when away from home is almost a must. Especially when using public WiFi hotspots or hotel internet.

Hello all, long time no see. I have a lot of other engagements lately and can’t reach to our beloved topic of pfSense. The fact that I don’t write new posts does not mean that I have abandoned it. Sometimes you have to put priorities to things in your life that are not as pleasant as other, but are just as much if not more important.

Enough said about that. Let’s get to the topic.

Recently I was visiting Asian country. As you probably know there are some places that some sites are restricted for access. It was a strange experience to not be able to open pages that you usually use every day. On other hand I would prefer to route all traffic over my Internet connection back at home when in a foreign country. Just as a protection.

So for test purposes I’ve setup an OpenVPN instance to check if I’m able to route all my traffic back home.

During my research I’ve came across very interesting article on the pfSense documentation. The article is: “Sharing a Port with OpenVPN and a Web Server

It works and the only modification that has to be made to the OpenVPN server configuration are as follows:

  1. Set the protocol to TCP in the General Information sectionSharing a Port with OpenVPN and a Web Server 01
  2. Don’t forget to tick in the Tunnel Settings > Redirect Gateway

(Force all client generated traffic through the tunnel.)

Sharing a Port with OpenVPN and a Web Server 03

  1. In Advanced configuration section in Advanced field put the following:

port-share localhost 443Sharing a Port with OpenVPN and a Web Server 02

The old OpenVPN configuration instructions you can find here:

pfSense 2.0 RC1 configuration of OpenVPN Server for Road Warrior with TLS and User Authentication

Now you can connect to your pfSense / OpenVPN server on HTTPS and hopefully it would appear much like you are opening a page over SSL.

Have fun and as usual I don’t take any kind of responsibly for the way you use this setup, or any legal actions or consequences for that matter or related to it.

Potential DNS Rebind attack detected, workaround

If you publish sites to the Internet behind pfSense device, and then try to open the Internet address you will receive the following error message:

Potential DNS Rebind attack detected, see http://en.wikipedia.org/wiki/DNS_rebinding

Try accessing the router by IP address instead of by hostname.

This will appear on your browser.

Potential DNS Rebind attack detected 01

Recently I’ve hit this issue.

The workaround the problem that I’ve found is as follows.

You set for the network behind the pfSense device a static DNS record for the site, pointing to the internal IP address. In this way you bypass the security checks.

The solution is as follows:

Go you the Web GUI of the pfSense, select

Services > DNS Forwarder

Potential DNS Rebind attack detected 02

There at the bottom of the page, is the section Host Overrides.

Clock on the “+” sign in this section

Potential DNS Rebind attack detected 03

Here for the site that you want to open fill in the following:

Let’s say for example you published the site:

Something.anything.com

In the Host field enter: Something

In the Domain field enter: anything.com

In the IP Address field: enter the internal IP address of the server hosting the site

In the Description: fill something useful, so half a year later, you can remind yourself that this exception was for 😉

Click on Save.

Potential DNS Rebind attack detected 04

Upgrade from pfSense 2.1.5 to 2.2 on Hyper-V

After the release of pfSense 2.2 it was time to upgrade some installations. They resides on Windows Server 2012 R2 Hyper-V. After the first reboot my test machine did not come up. The screen looks like this:

pfSense 2.2 Upgrade 01The error message is quite interesting at first:

Mounting from ufs:/dev/ad0s1a failed with error 19.

After little goggling I’ve found this article:

Mounting from ufs:/dev/adaxs1a failed with error 19.

and after simple entering of one ? the answer to the problem was in front of me:

pfSense 2.2 Upgrade 02The disk names were change from

ad0s1a

to

da0s1a

So to boot I’ve typed:

pfSense 2.2 Upgrade 03and voilàpfSense 2.2 Upgrade 04

Now the only thing that is left if to make changes to the boot configuration

You have the option to for form console

8) ShellpfSense 2.2 Upgrade 05and edit the file pfSense 2.2 Upgrade 06Mine looked like this:pfSense 2.2 Upgrade 07and after the change like thispfSense 2.2 Upgrade 08

Of if you will you can make the change using the web gui

go in the Diagnostics menu and selecting the Edit FilepfSense 2.2 Upgrade 09From there you just naviage to the “/etc/fstab” and edit the text.pfSense 2.2 Upgrade 10After changes test that the system is booting from the correct partition.