I may have mentioned in my previous post that my ER-X has its global DNS setting hidden in "Config Tree" section.
If you are like myself who has set the global DNS servers using the "Name Server" option in the System section, you may be using the wrong server without knowing it.
In order to avoid this happens again, I start to use whoismydns.org to verify my setup after any DNS changes, e.g.
Sunday, February 16, 2020
Saturday, February 15, 2020
PiHole and adlists.list
I have using Pi-Hole to remove ads from sites I visits, and here is the blocklist I am using in my set up.
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
https://mirror1.malwaredomains.com/files/justdomains
http://sysctl.org/cameleon/hosts
https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist
https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
https://hosts-file.net/ad_servers.txt
https://raw.githubusercontent.com/anudeepND/youtubeadsblacklist/master/domainlis
t.txt
https://raw.githubusercontent.com/anudeepND/youtubeadsblacklist/master/hosts.txt
https://raw.githubusercontent.com/vokins/yhosts/master/hosts.txt
https://1hos.cf/
https://raw.githubusercontent.com/deathbybandaid/piholeparser/master/Subscribabl
e-Lists/ParsedBlacklists/Adblock-YouTube-Ads.txt
https://raw.githubusercontent.com/Lerist/Go-Hosts/master/hosts-ad
https://raw.githubusercontent.com/jdlingyu/ad-wars/master/hosts
https://raw.githubusercontent.com/ZYX2019/host-block-list/master/Custom.txt
https://codeberg.org/Jeybe/pi-hole-blocklists/raw/branch/master/blocklist.txt
https://encrypt-the-planet.com/downloads/hosts
https://codeberg.org/WaLLy3K/pi-hole-blocklists
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
https://mirror1.malwaredomains.com/files/justdomains
http://sysctl.org/cameleon/hosts
https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist
https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
https://hosts-file.net/ad_servers.txt
https://raw.githubusercontent.com/anudeepND/youtubeadsblacklist/master/domainlis
t.txt
https://raw.githubusercontent.com/anudeepND/youtubeadsblacklist/master/hosts.txt
https://raw.githubusercontent.com/vokins/yhosts/master/hosts.txt
https://1hos.cf/
https://raw.githubusercontent.com/deathbybandaid/piholeparser/master/Subscribabl
e-Lists/ParsedBlacklists/Adblock-YouTube-Ads.txt
https://raw.githubusercontent.com/Lerist/Go-Hosts/master/hosts-ad
https://raw.githubusercontent.com/jdlingyu/ad-wars/master/hosts
https://raw.githubusercontent.com/ZYX2019/host-block-list/master/Custom.txt
https://codeberg.org/Jeybe/pi-hole-blocklists/raw/branch/master/blocklist.txt
https://encrypt-the-planet.com/downloads/hosts
https://codeberg.org/WaLLy3K/pi-hole-blocklists
Office 365 and Access Engine
If you are developing an application using an Office 365 Access database, you may come across this error.
If you are like myself, the instant reaction is to look for an Office 365 runtime. Indeed there is one available, however, this does not only not solving your problem, but it also overtake your proper "full" Access when you are trying open an accdb file.
So, what should I use then? The answer is an Access Engine. You may ask WTF, an Access Engine? I am afraid I don't have an answer for this. I can only say the Access Engine works but the runtime doesn't. You can find the engine at:
https://www.microsoft.com/en-us/download/details.aspx?id=54920
After the installation, your application should be able to connect to OLEDB database as usual.
Here is an example I wrote:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.OleDb;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
string connectionString =
@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=SampleDatabase.accdb;Persist Security Info=False;";
Console.WriteLine($"Connecction String: {connectionString}");
using (OleDbConnection conn = new OleDbConnection(connectionString))
{
conn.Open();
OleDbCommand cmd = conn.CreateCommand();
cmd.CommandText = "SELECT TOP 1 message FROM Sample";
string message = (string)cmd.ExecuteScalar();
Console.WriteLine($"Message from database: {message}");
}
}
}
}
If you still encounter the "Microsoft.ACE.OLEDB.12.0" error after installing the engine, you may want to change the platform target from ANY to x86 for 32bit or x64 for 64bit engine.
Updated 2020-02-26
If you have stability issues, e.g. SSIS project keeps crashing when using OLEDB to connect to a data source, you may want to downgrade the engine to 2010 (https://www.microsoft.com/en-gb/download/details.aspx?id=13255)
System.InvalidOperationException HResult=0x80131509 Message=The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine. Source=System.Data StackTrace: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at
If you are like myself, the instant reaction is to look for an Office 365 runtime. Indeed there is one available, however, this does not only not solving your problem, but it also overtake your proper "full" Access when you are trying open an accdb file.
So, what should I use then? The answer is an Access Engine. You may ask WTF, an Access Engine? I am afraid I don't have an answer for this. I can only say the Access Engine works but the runtime doesn't. You can find the engine at:
https://www.microsoft.com/en-us/download/details.aspx?id=54920
After the installation, your application should be able to connect to OLEDB database as usual.
Here is an example I wrote:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.OleDb;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
string connectionString =
@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=SampleDatabase.accdb;Persist Security Info=False;";
Console.WriteLine($"Connecction String: {connectionString}");
using (OleDbConnection conn = new OleDbConnection(connectionString))
{
conn.Open();
OleDbCommand cmd = conn.CreateCommand();
cmd.CommandText = "SELECT TOP 1 message FROM Sample";
string message = (string)cmd.ExecuteScalar();
Console.WriteLine($"Message from database: {message}");
}
}
}
}
If you still encounter the "Microsoft.ACE.OLEDB.12.0" error after installing the engine, you may want to change the platform target from ANY to x86 for 32bit or x64 for 64bit engine.
If you have stability issues, e.g. SSIS project keeps crashing when using OLEDB to connect to a data source, you may want to downgrade the engine to 2010 (https://www.microsoft.com/en-gb/download/details.aspx?id=13255)
Labels:
access,
Access Engine,
Access Runtime,
Microsoft.ACE.OLEDB.12.0,
Office 365,
oledb,
ssis
Tuesday, January 7, 2020
Setting Up UPnP in OPNSense for XBox
I know UPnP is bad but there are situations where you have no other options but giving in and using the UPnP such as getting XBox NAT state from "Strict" To "Open".
Here are steps I have taken to enable UPnP for my Xbox.
1) Install os-upnp plugin.
Under System -> Firmware -> Plugins, look for os-upnp and install this plugin if you haven't already done so.
2) Give your XBox a static IP.
You can either do this by manually assigning an IP to your XBox, or by using reserved IP option.
3) Enable UPnP Service
Under Services -> Universal Plug and Play, enable options as shown in the diagram below. Use the IP you set in (2) for the masked part.
4) Create an Aliases for devices intending to use UPnP
Under Firewall -> Aliases, create an alias as below. In the content box, enter the IPs of devices which are intending to use the UPnP service.
5) Change the Firewall:NAT:Outbound modem to hybrid.
6) Add the manual rule for port forward
Under Firewall -> NAT -> Outbound, add a manual rule similar as shown in the diagram.
With the setup above, your Xbox should show its NAT state as Open. (you may need to reboot your XBox)
The above tutorial is based on an article I found at:
https://www.tweaking4all.com/network-internet/pfsense-strict-nat-xbox-one/
Hope you find this useful.
Here are steps I have taken to enable UPnP for my Xbox.
1) Install os-upnp plugin.
Under System -> Firmware -> Plugins, look for os-upnp and install this plugin if you haven't already done so.
2) Give your XBox a static IP.
You can either do this by manually assigning an IP to your XBox, or by using reserved IP option.
3) Enable UPnP Service
Under Services -> Universal Plug and Play, enable options as shown in the diagram below. Use the IP you set in (2) for the masked part.
4) Create an Aliases for devices intending to use UPnP
Under Firewall -> Aliases, create an alias as below. In the content box, enter the IPs of devices which are intending to use the UPnP service.
6) Add the manual rule for port forward
Under Firewall -> NAT -> Outbound, add a manual rule similar as shown in the diagram.
With the setup above, your Xbox should show its NAT state as Open. (you may need to reboot your XBox)
The above tutorial is based on an article I found at:
https://www.tweaking4all.com/network-internet/pfsense-strict-nat-xbox-one/
Hope you find this useful.
Saturday, October 12, 2019
PiHole and x86
I was going to set up PiHole for a friend. Since she has an old Netbook available, I think why not using it. This sounds logical right? It would be if most distros are not 64bit only in their latest version. Also, I am looking for something small and lightweight.
At the end, I picked Linux Lite (https://www.linuxliteos.com/). Their Series 3 is still available in 32bit and because it is based on Ubuntu LTS, it is still in support till 2021.
Linux and PiHole installation is pretty standard and straightforward.
If you have issue to access the PiHole, you may want to check the firewall setting in Linux Lite. Also, it is worth to check the power saving option too to ensure the computer won't got to sleep.
At the end, I picked Linux Lite (https://www.linuxliteos.com/). Their Series 3 is still available in 32bit and because it is based on Ubuntu LTS, it is still in support till 2021.
Linux and PiHole installation is pretty standard and straightforward.
If you have issue to access the PiHole, you may want to check the firewall setting in Linux Lite. Also, it is worth to check the power saving option too to ensure the computer won't got to sleep.
Saturday, September 28, 2019
EdgeRouter X VLAN and Firewall Rule Sets
One of the reasons you want to use VLAN is to segregate your network and to control traffics from one network to another. This post is just about this.
One of the issue I have is the direction in a ruleset As I was trying to limit the incoming traffics to an interface, you would think the direction should be IN. Oddly, the direction is actually OUT.
In this example, I have a VLAN 100 and would like to accept traffics from VLAN 1 and 2 into this network, but to restrict the access from it to VLAN 1 and 2.
To do this, I set the default action of this rule to DROP, and then added three rulesets to grant the permitted traffics.
The first rule is a general rule which allows any traffics from this VLAN to connect to the internet.
For this, I created a ruleset, and set its action to ACCEPT, and allowed all protocols. Then, on the advanced tab, I selected the states ESTABLISHED AND RELATED.
The second rule is a specific rule allowing VLAN 1 traffics to enter into this network.
For this, I created a ruleset, and set its action to ACCEPT, and allowed all protocols. Then, on the advanced tab, I selected the states ESTABLISHED AND RELATED (you may also need NEW). One extra is required for this ruleset, and it is specifying its source! on the source tab, I picked VLAN 1 from Network Interface dropdown box (or specifying the VLAN 1 IP, e.g. 192.168.1.0/24). I applied similar steps for VLAN 2.
After all of these, VLAN 100 should be able to accept traffics from VLAN 1, and 2, and be able to talk to the WAN. However it should not be able to access network resources in VLAN 1 and 2.
Above is based on this tutorial video I found on YouTube.
One of the issue I have is the direction in a ruleset As I was trying to limit the incoming traffics to an interface, you would think the direction should be IN. Oddly, the direction is actually OUT.
In this example, I have a VLAN 100 and would like to accept traffics from VLAN 1 and 2 into this network, but to restrict the access from it to VLAN 1 and 2.
To do this, I set the default action of this rule to DROP, and then added three rulesets to grant the permitted traffics.
The first rule is a general rule which allows any traffics from this VLAN to connect to the internet.
For this, I created a ruleset, and set its action to ACCEPT, and allowed all protocols. Then, on the advanced tab, I selected the states ESTABLISHED AND RELATED.
The second rule is a specific rule allowing VLAN 1 traffics to enter into this network.
For this, I created a ruleset, and set its action to ACCEPT, and allowed all protocols. Then, on the advanced tab, I selected the states ESTABLISHED AND RELATED (you may also need NEW). One extra is required for this ruleset, and it is specifying its source! on the source tab, I picked VLAN 1 from Network Interface dropdown box (or specifying the VLAN 1 IP, e.g. 192.168.1.0/24). I applied similar steps for VLAN 2.
After all of these, VLAN 100 should be able to accept traffics from VLAN 1, and 2, and be able to talk to the WAN. However it should not be able to access network resources in VLAN 1 and 2.
Above is based on this tutorial video I found on YouTube.
Wednesday, September 25, 2019
Problem connection to Samba Server
Today I have reinstalled Linux on a machine of mine, and configured it to use Samba to share a folder to the rest of my network.
However, when I tested my setup on a Windows machine, I got connection error. I have checked my setup and everything seems to be fine. At the end, it turns out nothing wrong with my setup as I can connect to this machine using IP. The problem is with my NetBIOS resolver.
My Linux machine IP is 133, but the IP reported when I ping it on my Windows machine is 113.
However, when I tested my setup on a Windows machine, I got connection error. I have checked my setup and everything seems to be fine. At the end, it turns out nothing wrong with my setup as I can connect to this machine using IP. The problem is with my NetBIOS resolver.
My Linux machine IP is 133, but the IP reported when I ping it on my Windows machine is 113.
If you have similar issue as i did, you may want to check your NetBIOS resolver too. The problem may be in your network rather than your setting.
n.b. To clear DNS caches under Ubuntu is:
sudo systemd-resolve --flush-caches
Labels:
connection error,
DNS,
flush caches,
NetBISO,
Resolver,
Samba,
systemd-resolve
Subscribe to:
Posts (Atom)






