Get Associated WiFi Clients OpenWRT

In order to see associated wifi clients, even if they don’t have a DHCP Client or have no ip, you have to ask the AP for associated wifi devices:

# Universal (Tested with OpenWRT 14.07 and 15.05.X)
iwinfo wlan0/wl0/ath0 assoclist

# Proprietary Broadcom (wl)
wl -i wl0 assoclist

# Proprietary Atheros (madwifi)
wlanconfig ath0 list sta

# MAC80211
iw dev wlan0 station dump

This way you will also see the connection speed. For me this is looking like this:

# iwinfo wlan0 assoclist
12:34:56:78:9A:BC -26 dBm / -95 dBm (SNR 69) 1930 ms ago
RX: 24.0 MBit/s, MCS 0, 20MHz 3359 Pkts.
TX: 130.0 MBit/s, MCS 14, 20MHz, short GI 1209 Pkts.

Source:  https://serverfault.com/a/776302

Cara Mengetahui Password Database iPos 4.0

Program ipos menggunakan database postgresql yang dibuka pada port 5444
Database tsb dapat diakses menggunakan username admin dan password yang berbeda-beda untuk setiap instalasi di PC

Untuk mengetahui password database ipos adalah sbb:

1. download process explorer
https://technet.microsoft.com/en-us/sysinternals/bb896653.aspx

2. buka program ipos

3. masuk tab pengaturan

4. klik tombol backup database di toolbar

5. masukan nama file (klik browse), kasih nama apa aja, ga penting

6. buka program process explorer yang sudah di download di no 1

7. cari nama process ipos4.exe

8. atur jendela ipos dan process explorer bersebelahan, sehingga dapat melihat 2 aplikasi sekaligus

9. kembali ke program ipos dan klik proses (proses backup), sambil memperhatikan aplikasi process explorer

10. pada saat tombol proses di aplikasi ipos di klik, akan muncul process bernama pg_dump di aplikasi process explorer dalam waktu yang sangat singkat, kemudian akan hilang kembali, untuk itu anda perlu mendobel klik pada tulisan pg_dump cepat-cepat, jika anda tidak berhasil, bisa mengulangi kembali langkah no 9

11. jika anda berhasil akan muncul window baru dari aplikasi process explorer, pindah tab environment dan password postgresql bisa dilihat di kolom PGPASSWORD

Selamat mencoba!

– Sumber: hasil dari coba-coba

Using Control Script PTZ Zoneminder DCS-5020L

PTZ Controls can be used from within ZoneMinder using the control script linked below. Copy the script contents into a file alongside of the other ZM Control Scripts.
PATH: /usr/share/perl5/ZoneMinder/Control

D-Link DCS-5020L Control Script

PTZ Settings:

Main: Type: Remote, Protocol: DCS5020L, Name: DCS5020L, Can Wake, Can Sleep, Can Reset
Move: Can Move, Can Move Diagonally, Can Move Mapped, Can Move Relative
Pan: Can Pan, Min Pan Step 1, Max Pan Step 30
Tilt: Can Tilt, Min Tilt Step 1, Max Pan Step 30
Presets: Has Presets, Number: 24, Has Home Preset

Note: Wake turns IR on, Sleep turns IR off, Reset turns IR to auto.

Settings for Control Tab:

Controllable, Control Type: DCS5020L, Control address: user:pass@ipaddress

Notes:

  1. For PTZ control, the user/pass combination must be an administrator on the camera. A regular view-only user will not work.
  2. An unknown-quality H.264 stream available at http://user:pass@ip.of.camera/dgh264.raw . Haven’t worked out how to get it working in zoneminder yet.
  3. Audio is available from http://user:pass@ip.of.camera/dgaudio.cgi while the accompanying video is at http://user:pass@ip.of.camera/dgvideo.cgi
  4. The DCS-5020L script was based on the Trendnet TV-IP400W control script, available at http://www.sfpeter.com/2008/07/new-trendnet-tv-ip400w-controller-for-zoneminder-123x/ . “use ZoneMinder::Debug qw(:all);” was replaced with “use ZoneMinder::Logger qw(:all);” for zoneminder 1.25 compatibility.

Source:
– https://wiki.zoneminder.com/D-Link_DCS-5020L_Control_Script

Installing PEAR packages in XAMPP Windows

First open command prompt administrator because the script will try to write c:\windows\pear.ini

Next run this commands in xampp\php folder:
pear config-set doc_dir \xampp\php\docs\PEAR
pear config-set cfg_dir \xampp\php\cfg
pear config-set data_dir \xampp\php\data\PEAR
pear config-set test_dir \xampp\php\tests
pear config-set www_dir \xampp\php\www

Then you can install any packages using this command:
pear install <package-name>

example: pear install mail

Note: if you are using php 7.2, you might get error “PHP Fatal error: Cannot use result of built-in function in write context in \xampp\php\pear\Archive\Tar.php on line xxx”, read this to fix it: https://www.dotkernel.com/php-troubleshooting/fix-installing-pear-packages-with-php-7-2/

Source:
– http://stackoverflow.com/questions/62658/getting-pear-to-work-on-xampp-apache-mysql-stack-on-windows

Access denied to Administrative (Admin) shares in Windows 8, 8.1, 10

3 ways to fix:
1. Map Admin Shares with the built-in administrator account
2. LocalAccountTokenFilterPolicy – UAC remote restrictions

To get rid of the Access Denied message, follow this procedure:

  1. Launch the Registry editor by typing regedit.exe in the Start Screen.
  2. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System.
  3. Create a new entry by right-clicking System and then selecting DWORD (32-bit) Value.
  4. Choose LocalAccountTokenFilterPolicy as name for the new entry.
  5. Set the value of LocalAccountTokenFilterPolicy to 1 by right-clicking the new entry.

3. Disable UAC Admin Approval mode

Note: Disabling UAC Admin Approval mode will also disable the Windows Store app.

  1. Launch Control Panel, type admin… in the search box, and then click Administrative Tools.
  2. Open the Local Security Policy application.
  3. Navigate to Local Policies > Security Options.
  4. Disable the policy User Account Control: Run all administrators in Admin Approval Mode.

 

Note: For Windows 11
If you want to configure auto-login, then you need to disable the “only allow Windows Hello sign-in” option using the following steps:

  1. Click Start, Settings, and click Accounts.
  2. Click on Sign-in options
  3. Turn off the radio button under the Require Windows Hello sign-in for Microsoft accounts section.
    The description “For improved security, only allow Windows Hello sign-in for Microsoft accounts on this device (Recommended)” is self-explanatory.
NOTE: The Require Windows Hello sign-in for Microsoft accounts option would be missing if no Microsoft accounts are configured on the computer.

Registry Editing
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\PasswordLess\Device

Value name:
DevicePasswordLessBuildVersion

Data:
0
means Require Windows Hello sign-in is disabled
2
means Require Windows Hello sign-in is enabled

Deleting DevicePasswordLessBuildVersion or setting it to 0 would enable the “Users must enter a user name and password to use this computer” checkbox.

After disabling the above setting, close and reopen the User Accounts dialog by running netplwiz.exe or control userpasswords2

 

source:
– https://4sysops.com/archives/access-denied-to-administrative-admin-shares-in-windows-8/
– https://www.winhelponline.com/blog/users-must-enter-a-user-name-and-password-to-use-this-computer-missing-windows-10/

How to Enable GRE in OpenWRT (PPTP NAT Traversal)

PPTP utilizes the GRE (Generic Routing Encapsulation) protocol for its point-to-point tunnel. As a pure IP protocol GRE uses only IP addresses but no port numbers giving the router’s NAT a tough time to track such a connection. In its base configuration OpenWrt Backfire is able to NAT a single PPTP connections but not multiple such connections concurrently. It is also unreliable when trying to establish consecutive single PPTP connections from different LAN clients in rapid succession. This limitation can be lifted (as far as I could make out so far) by installing the following package.

Installation

Requirements:
kmod-ipt-nathelper-extra

For the current versions of OpenWRT (since Chaos Calmer 15.05), you should install:

opkg install kmod-nf-nathelper-extra

You should now be able to use multiple PPTP connections from LAN to WAN at the same time.

Old versions until Barrier Breaker 14.07 used ‘kmod-ipt-nathelper-extra’ instead:

opkg install kmod-ipt-nathelper-extra

 

Source:
https://wiki.openwrt.org/doc/howto/vpn.nat.pptp

Port Proxy in iptables – Forwarding port to another host

Here is the commands, for example you want to forward port 8080 to another host 192.168.100.2:8080

preparation, enable ip forward
sysctl net.ipv4.ip_forward=1

first we need to masquerade the packet
iptables -t nat -I POSTROUTING -p tcp -j MASQUERADE

Second, change the destination to another host
iptables -t nat -I PREROUTING -p tcp --dport 8080 -j DNAT --to-destination 192.168.100.2:8080

Or, listen on specific ip
iptables -t nat -I PREROUTING -p tcp -d 192.168.100.1 --dport 8080 -j DNAT --to-destination 192.168.100.2:8080

This last is optional, you may need it if your FORWARD chain default REJECT
iptables -I FORWARD -d 192.168.100.2 -p tcp --dport 8080 -j ACCEPT

Note:
* iptables rules is not persistent, you can make it persistent using iptables-persistent
* you can also use ufw rules, save in the file /etc/ufw/before.rules

Source: https://askubuntu.com/questions/320121/simple-port-forwarding

Ubuntu SUDO without Password

type this command:

sudo visudo

add this line:

username ALL=NOPASSWD: ALL

Note: When multiple entries match for a user, they are applied in order. Where there are multiple matches, the last match is used (which is not necessarily the most specific match). So add the line above at the bottom of file.

Source:
– http://askubuntu.com/questions/334318/sudoers-file-enable-nopasswd-for-user-all-commands

Windows 10 VPN – “Connect” Missing from List of Network Connections

Okay, so I wasn’t sure how to title this article. However, I will endeavor to explain my frustration I am having with Windows 10’s VPN settings.

Whenever I click the network icon in Windows 10, it will bring up my local connection, WiFinetworks, and VPN connections. When I select my VPN connection instead of being able to connect directly from the first network setting list I get directed into the Settings app in Windows 10.

Connect is “Missing” underneath my VPN connection on Windows 10. From the Settings app in Windows 10, I can then select my VPN connection and click connect.

I know this may sound quite trivial but it is a frustration especially since it feels like we took a step back from Windows 7 and Windows 8.

I did some searching online to see if I was alone in my complaint. I certainly wasn’t. I found this thread on Microsoft’s forums with other people frustrated with the same limitation. On this forum I came across a work around to allow me to connect from the first list of network connections. Thanks Tobias.Csaki

Here are the steps to accomplish this.

1. Open Regedit ( How did you know this wasn’t coming ha! ) (WIN+R and type regedit.exe)

2. Navigate to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Control Panel\Settings\Network

3. Take ownership of the “Network” key/folder (right click, Permissions)

4. Select “Advanced” in the Permissions window

5. In the Advanced window, select “Change” where the owner field is (at the top of the window)

6. Type in your username and save your changes.

7. Close the advanced window

8. Now select “Administrators” in the security tab

9. Make sure “Full control” is selected, then apply changes

10. Now that’s done, double click “ReplaceVan”

11. Change it’s value to 2

These changes should take place without having to reboot. Now when you click the network connections icon you will get a Windows 8 type network menu that allows you to connect to your VPN connections.

You can also set these values:
0 – to open the default Network flyout.
1 – to open Network settings in the Settings app.
2 – to open a Windows 8-like Network pane.

— EDIT 20170427: this seems to be problem when connecting to protected WiFi Network after update Windows 10 Anniversary, so i just revert it back to value 0, for efficiency I use batch file to connect VPN Easily, I’ll share next time

Source:
– http://techspeeder.com/2015/09/15/windows-10-vpn-connect-missing-from-first-list-of-network-connections/
– http://winaero.com/blog/change-network-icon-click-action-in-windows-10/