Configuring OpenVPN for a PreShared or Static Keys for Windows client to pfSense Server

Well, this is less secure, but easier. Configure two computers with one key to complete a tunnel from one computer to another. Here are some links that helped me.

Below is a client file that matches the server file that I need to connect to.

[vb]

remote someserver.domain.com
proto udp
port 9999

#note there is no 0 behind tun – that is for linux
dev tun
#IP ADDRESSING mode example
# Server IP: 10.10.2.1; Client (this computer) 10.10.2.2
#there is a limitation to use .2 only if .1 is the server for the tunnel

ifconfig 10.10.2.2 10.10.2.1
#Windows needs full quoted path if spaces exist
secret "C:\\Program Files (x86)\\OpenVPN\\config\\my-static.key"
verb 3
#verb 9 troubleshooting
comp-lzo
keepalive 15 60

#daemon ; not for windows
#if we assume that our local OpenVPN machine is on 192.168.22.0/24 network
#but pfSense already is already told what network we are on the setting page
#route 192.168.22.0 255.255.255.0
[/vb]

 

Bentley Autoplant changing SysID’s – a way to do so in VBA code

OK – so I FINALLY have the whole mystery solved of what happens to SySID’s (sys id’s) in the front end (generation) and use (in DWG model files). Ideally they should match – so if you can’t change the source (out of my control) let try to change the destination?? Lets investigate.

First, I have needed to understand where Bentley puts all their data in AutoCAD. Finally I have an excuse to finish my investigation. I would like to change my Sys’IDs for a set of components so that the match the Spec Gen ones. So due to a situation out of my control (we simply wanted the Long Description changed), the SyS ID’s were all changed and it is more work to get them changed at the source than just change them in the DWG or AutoPLANT model. So lets look for them, find them and change them and heck, why not change some other items along the way like that Long Description.

In this article, lets look at all the XDATA apps that Autoplant uses. It discusses how to know what they are and what all the values are. Low and behold – the storage. Currently this article does not look at changing the values – that will come VERY shortly. Continue reading

Adding a splash or landing page to your wifi – dd-wrt

I have a customer who wanted help with getting a landing page onto their wi-fi. Now Coova networks has some solutions and pay-per-month services exist where users can log in exchange for making an account do exist. A link and name is needed but there is also Wifi Dog which is an open source project that does something like this as well.

I found this goldmine article from flashrouters.com for the latest dd-wrt compatible router recommendations and they seem like they have great customer service. I am trying to find an excuse to buy from them just for that reason. For a simple splash page, I have found that many people recommended a plug in for dd-wrt called NoCatSplash – but if the router where NoCatSplash is installed is not controling the DHCP (Windows recommended best practices) then that feature is disabled. Well, that was my intent – however one could install it as a router within the LAN network. Lets keep looking around. Worldspot.net has a solution that is used with Coova enabled routers for a splash page as well.

Specification Generator or Spec Gen Talk about Sys IDs

A Bentley article that talks about components not getting updated with Spec Gen and how the sysId plays into this. It is a great discussion about how sysId’s are generated used and how they affect things. There are links that take the discussion further and show more insight in how Bentley’s system was created in order to do customization.

Before I gave some catalogs to the Spec Integration team, I had to regenerate the system IDs. WHat happens if you don’t? It deletes the duplicates – so poof – a whole bunch of specs could disappear on a copy/paste. So it is important to change a column that affects the SYS id which is listed in the MDB file under the DefaultSysIDs table. Note that Short in once counted and Long Descriptions on both did not count. Use the tool under the File Menu of the Specification Generator to randomize these values for you. It can be run on Catalogs and/or Specs at the same time.

 

 

Advice Catching Exceptions – a trick from a mentor

Using ASPX – we catch general exceptions – well some messages are too general. Here is some advice emailed to me from a mentor and friend Sjoerd.

UPDATE: Be careful on what messages get thrown/exposed to the final client. If there are open data that is sensitive – the advice below might bee too revealing.

When catching errors, please make sure you bring back the following properties from the exception:

  • Ex.StackTrace
  • Ex.Message
  • Ex.InnerException

He included these links

If you like, you can throw an exception on purpose and look at what the properties will return you.

Report Services SSRS duplicates last row group and rows when exported to Excel – and only an excel import – a “feature” says Microsoft

Microsoft Calls it “by design” or a feature – most others would call it a bug. To keep things simple, if a group is added – it adds a row AND a column. In the current version (which is not accurate) when it is exported to Excel -the last row keeps getting duplicated making the Excel export NOT the same as the PDF or live report. Keep the group column is the short simple answer! It is a detail row (that is viewed in RowDetails->Advanced) that you might see NEEDS to be there for the excel export to work properly. Bug or not- this version fixes that issue.

The reference is here – the last line has Microsoft admitting that certain conditions must apply. Basicially – its a feature – here is how to fix that feature. 🙂

Making Paypal easy for WordPress – some options

Here are some links

Finally – someone from Paypal lists reasons that the credit card option is not always there… and a solution: Payment Pro

Tired of Paypal not showing the credit card option as the only option? Want to present you customers with a credit card screen and not a paypal one so they don’t have to sign up? Here are some reasons, explainations and … at the bottom a solution – Payments Pro – which is not free.

https://www.paypal-community.com/t5/About-Business-Archive/PayPal-forces-visitors-to-my-site-to-create-a-PayPal-account/td-p/696827

Other options are (unresearched)

 

Excel reading / writing using aspx

Lots of work has been done reading and writing to excel. Here are the links that were used to figure it out various parts.

To make things easy when possible, uploading and downloading csv files with an Excel header.

I wish I had the code from another project – but back to Google to re-figure it all out again – this is the old style Excel, not the new .xlsx xml version so using the Excel api is important to (re)understand

Continue reading

Get Sharepoint List Access from SQL Server

Well, here I go – how to natively (or naively at this point – I just started this) manipulate Sharepoint Lists from SQL Server.

I did it! It is not using a linked server (I will get to the bottom of that though) but using an OPENROWSET works. This means that the user needs to have insert and select privileges – but there is a way around that too – by making a role/user internal to the dB and running the stored proc run (EXECUTE AS) that role/user. To get that to work takes some tinkering – another article will come soon regarding that.

Basically – the onerous method would show that the two statements below work Continue reading