geolocation – Configure sleep mode for a Progessive Web App (PWA)?

First of all I do not know the difference between “sleep mode” and “standby”, so I am most likely using the wrong term in the following problem description:

I build myself a little PWA that tracks my routes with OpenLayers. It works fine so far, but at some point the recording of a track is interrupted. I assume this is due to the automatic sleep mode, which “turns off” Chrome and probably therefore also “navigator.geolocation”.

Is there any chance to let my PWA and navigator.geolocation continue doing their work when Android is in sleep mode? And if so, is there any way to activate that setting via the PWA and without going into “Settings -> … -> …” (if that is at all an option)?

Thank you!

PS: The gis.stackexchange.com community recommended me to ask this question here.

PPS: A “PWA” (“Progressive Web App”), in short, is nothing else but a web application that is looks and behaves like a “real” app. Even though it is run in a browser (in my case I only focus on Chrome), it can be used offline via service workers, the UI does not show the browser’s address bar and some things more. By using all the modern browser APIs it is possible to create an app without having to go through the app store (even though a PWA could be registered as an app in the app store, too).

android – How should I configure my firewall using iptables commands to defend against hacking?

I need to add extra security to my Android device using iptables and a firewall to defend against hackers. My specific goals are to prevent a hacker from remotely breaking into my device to begin with and, in the event spyware is remotely placed on my device, my data/activity cannot be uploaded to whatever command center the hacker controls. Which commands should I use for maximum hacking defense? So far I only know about closing all ports except 80 and 443. I also need to know how to block all ports except those two, both incoming and outgoing, without preventing myself from browsing the web and other basics.

geolocation – Configure sleep mode for a PWA?

First of all I do not know the difference between “sleep mode” and “standby”, so I am most likely using the wrong term in the following problem description:

I build myself a little PWA that tracks my routes with OpenLayers. It works fine so far, but at some point the recording of a track is interrupted. I assume this is due to the automatic sleep mode, which “turns off” Chrome and probably therefore also “navigator.geolocation”.

Is there any chance to let my PWA and navigator.geolocation continue doing their work when Android is in sleep mode? And if so, is there any way to activate that setting via the PWA and without going into “Settings -> … -> …” (if that is at all an option)?

Thank you!

PS: The gis.stackexchange.com community recommended me to ask this question here.

Any easy tutorial to configure Netlify?

Any easy to follow guide how to migrate from namecheap hosting to Netlify cloud hosting? However, i lack the knowledge for git. Thanks… | Read the rest of https://www.webhostingtalk.com/showthread.php?t=1839324&goto=newpost

How to configure server for best perfomance?

Hello, i want to configure HP ProLiant DL360p G8 that support 4 x 3.5 Bay.
I think to install one SSD and 3 HDD. 1 TB SSD + 3 x 10 TB.
Bu… | Read the rest of https://www.webhostingtalk.com/showthread.php?t=1839244&goto=newpost

email – Configure Postfix to rewrite outgoing mail From address for specific recipients

I have an application which sends out email via a local Postfix v2.10.1, which relays mail via another SMTP host.

Is it possible to configure Postfix to rewrite a specific From address for emails to certain recipients?

For example, if…

  • From address = support@example.com
  • To address = foo@example.org or bar@example.net

Then rewrite the From address to noreply@example.com instead.

networking – Configure virtual serial port (COM TCP) via terminal on Windows 10

Context

I am working with a module built around a headless Raspberry Pi CM3+, the only form of interface with which is an ESP8266 chip (bear with me, the question isn’t about either of these) which is connected via UART and acts as a TCP-UART bridge. This means that if connecting/talking to it, say over telnet, my PC will see a network connection while the Pi sees a serial one. No other ports or interfaces are available.

My task is to transfer files (specifically, small video files) from a PC to the Pi. This much I know is possible; my method of achieving it so far has been:

  • Use a driver to create a virtual COM port outputting to the ESP via TCP (I used this one)
  • Log into the Pi over this ‘serial’ connection using Tera Term
  • Still using Tera Term, transfer the file with zmodem, having first sent the ‘rz’ command to the Pi

So far so good (and it took me a long time to get to even that point) – however, what I now have to do is simplify this process to the point where a most likely computer-illiterate user can do the same thing. I’m thinking the best way to do this would be to have a .bat file they can simply double click on which will prompt them to select the video file, then handle everything else for them. This would mean that everything I did previously using Tera Term and HW VSP3, I now have to accomplish using terminal commands.

I am able to install additional software on the Pi if required by removing it from the module.

Question

Is there a command-line piece of software I could run from a batch file that would create a virtual com port connecting to a TCP output? The closest I’ve found so far is com0com/com2tcp, but that doesn’t seem particularly command line friendly. Alternatively, is there a better way I could be going about this? I know socat would do the trick in Linux, but again the end user here probably doesn’t even know what Linux is.

networking – Linux rhel / centos, configure network bridge between two interfaces to communicate with secondary host (Using VMware)

Need
I have two Linux hosts. Host1 and Host2.
I need to be able to communicate with host2 on our network through a bridge built on Host1.

Problem:
br0 is pingable, but when ens161 and ens192 are both enabled, and I try to ping the br0 on Host1 I get “(!DUP)”s. I think this is caused by vmware’s pernicious mode on both port networks assigned to each vm. The main problem is, I cannot ping Host2 at all from the network.

Environment

Host1 (RHEL 7.9) has two interfaces. Want to use network-scripts to configure the interfaces.

  • ens161 – network connection to LAN – Uses vmware port-network-01
  • ens192 – network connection to host2 – Uses vmware port-network-02

Host2 (Ubuntu 18.04) has one interfaces. Want to use netplan for this interface.

  • ens160 – network connection to host1 – Uses vmware port-network-02

Host1 has the bridge set up called “br0”, and has network-script configured to give it an ip interface
Note these are virtual machines living on ESXi’s, their nics are connected to vmware port networks, each of which are on seperate vlans. Port networks are connected to a distributed switch.

Here are my network scripts

Host01 – br0

TYPE="Bridge"
DEVICE=br0
BOOTPROTO=static
ONBOOT=yes
NM_CONTROLLED="no"
PREFIX=22
IPADDR=10.10.10.10
NETMASK=255.255.255.0
GATEWAY=10.10.10.1

Host01 – ens161

DEVICE=ens-161
HWADDR=00:50:56:bd:9f:25
ONBOOT=yes
TYPE=Ethernet
IPV6INIT=no
USERCTL=no
BRIDGE=br0

Host01 – ens192

DEVICE=ens-192
HWADDR=00:50:56:bd:b3:cd
ONBOOT=yes
TYPE=Ethernet
IPV6INIT=no
USERCTL=no
BRIDGE=br0
enter code here

Here is Host2’s netplan configuration

HOST2 – ens160 (netplan yaml)

network:
    ethernets:
        ens160:
            addresses:
            - 10.10.10.11/24
            dhcp4: no
            gateway4: 10.10.10.1
    version:2

The rest below are all of Host1 the RHEL server with the bridge’s configurations:

Here is my brctl show information

bridge name     bridge id               STP enabled     interfaces
br0             8000.005056bd9f25       no              ens-161
                                                        ens-192

Here is ip -br addr show

lo               UNKNOWN        127.0.0.1/8 ::1/128
ens-161          UP             fe80::250:56ff:febd:9f25/64
ens-192          UP             fe80::250:56ff:febd:b3cd/64
br0              UP             10.10.10.10/24 fe80::250:56ff:febd:9f25/64

Here is iptables -L

Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED
ACCEPT     all  --  anywhere             anywhere
INPUT_direct  all  --  anywhere             anywhere
INPUT_ZONES_SOURCE  all  --  anywhere             anywhere
INPUT_ZONES  all  --  anywhere             anywhere
DROP       all  --  anywhere             anywhere             ctstate INVALID
REJECT     all  --  anywhere             anywhere             reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED
ACCEPT     all  --  anywhere             anywhere
FORWARD_direct  all  --  anywhere             anywhere
FORWARD_IN_ZONES_SOURCE  all  --  anywhere             anywhere
FORWARD_IN_ZONES  all  --  anywhere             anywhere
FORWARD_OUT_ZONES_SOURCE  all  --  anywhere             anywhere
FORWARD_OUT_ZONES  all  --  anywhere             anywhere
DROP       all  --  anywhere             anywhere             ctstate INVALID
REJECT     all  --  anywhere             anywhere             reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
OUTPUT_direct  all  --  anywhere             anywhere

Chain FORWARD_IN_ZONES (1 references)
target     prot opt source               destination
FWDI_public  all  --  anywhere             anywhere            (goto)
FWDI_public  all  --  anywhere             anywhere            (goto)
FWDI_public  all  --  anywhere             anywhere            (goto)
FWDI_public  all  --  anywhere             anywhere            (goto)

Chain FORWARD_IN_ZONES_SOURCE (1 references)
target     prot opt source               destination

Chain FORWARD_OUT_ZONES (1 references)
target     prot opt source               destination
FWDO_public  all  --  anywhere             anywhere            (goto)
FWDO_public  all  --  anywhere             anywhere            (goto)
FWDO_public  all  --  anywhere             anywhere            (goto)
FWDO_public  all  --  anywhere             anywhere            (goto)

Chain FORWARD_OUT_ZONES_SOURCE (1 references)
target     prot opt source               destination

Chain FORWARD_direct (1 references)
target     prot opt source               destination

Chain FWDI_public (4 references)
target     prot opt source               destination
FWDI_public_log  all  --  anywhere             anywhere
FWDI_public_deny  all  --  anywhere             anywhere
FWDI_public_allow  all  --  anywhere             anywhere
ACCEPT     icmp --  anywhere             anywhere

Chain FWDI_public_allow (1 references)
target     prot opt source               destination

Chain FWDI_public_deny (1 references)
target     prot opt source               destination

Chain FWDI_public_log (1 references)
target     prot opt source               destination

Chain FWDO_public (4 references)
target     prot opt source               destination
FWDO_public_log  all  --  anywhere             anywhere
FWDO_public_deny  all  --  anywhere             anywhere
FWDO_public_allow  all  --  anywhere             anywhere

Chain FWDO_public_allow (1 references)
target     prot opt source               destination

Chain FWDO_public_deny (1 references)
target     prot opt source               destination

Chain FWDO_public_log (1 references)
target     prot opt source               destination

Chain INPUT_ZONES (1 references)
target     prot opt source               destination
IN_public  all  --  anywhere             anywhere            (goto)
IN_public  all  --  anywhere             anywhere            (goto)
IN_public  all  --  anywhere             anywhere            (goto)
IN_public  all  --  anywhere             anywhere            (goto)

Chain INPUT_ZONES_SOURCE (1 references)
target     prot opt source               destination

Chain INPUT_direct (1 references)
target     prot opt source               destination

Chain IN_public (4 references)
target     prot opt source               destination
IN_public_log  all  --  anywhere             anywhere
IN_public_deny  all  --  anywhere             anywhere
IN_public_allow  all  --  anywhere             anywhere
ACCEPT     icmp --  anywhere             anywhere

Chain IN_public_allow (1 references)
target     prot opt source               destination
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:ssh ctstate NEW,UNTRACKED

Chain IN_public_deny (1 references)
target     prot opt source               destination

Chain IN_public_log (1 references)
target     prot opt source               destination

Chain OUTPUT_direct (1 references)
target     prot opt source               destination

Trouble shooting:

  • I followed the instructions from this post. Did not seem to help. The topology is the same as mine besides the different network interface names.
    bridge network between two linux servers
  • Made sure to turn on pernicious mode and forged transmits on both port networks in vmware.
  • I stoped and disabled NetworkManager
  • I deployed a new ubuntu 18.04 system, and was able to configure the network bridge with netplan with no problems, it just worked.

Final thoughts
I know little to nothing about linux bridging, hence why I set up this lab to learn it. If I am going about this the wrong way, or not using bridges as intended, tell me. I want to make sure I understand the concepts as well as how to configure Linux bridging properly on Debian and RHEL systems.

display – Can’t configure 75hz on LG Ergo Ultrawide monitor with MacBook Pro

I own a:

  • LG Ergo 34WN780 – Ultrawide QHD Monitor – 34 inch
  • MacBook Pro (15-inch, 2019)
  • StarTech USB-C naar DisplayPort cable 1,8 metres

The monitor supports 75hz, but I can only configure it up to 60hz (3440x1440).

I’ve also tried to use the cscreen utility from terminal, but if I set:

cscreen -d 32 -x 3440 -y 1440 -r 75 -s 2

the monitor turns to 30hz for some reason, so it’s decreasing (although I passed -r 75).

What could be the issue?

magento2.3 – Magento2 configure PHPstorm & xdebug and how to use it

I was using sublime and VScode for the development. Recently I heard that PHPStorm is the best IDE for the Magento2 development and using xdebug you can easily debug the issues and write modules. I tried to setup my system for PHPstorm IDE. To be honest, I tried for 3-4 weeks to setup PHPStorm and Xdebug to run together in my system but it’s not working. I believe on this platform there are many geeks might have seen this issue and would help me to resolve those issue.

Operating System: Ubuntu 18.04
PHPStorm: Latest Version: 2020.3.2
Webserver: Nginx
PHP: PHP7.3-fpm

I have already install xdebug in linux and configured in /etc/php/7.3/fpm/php.ini and /etc/php/7.3/cli/php.ini

If I run phpinfo() it shows xdebug is already installed. Also, I have installed xdebug Firefox and Chrome extensions (which I saw in one of the video on youtube) but unfortunately still not working.

I have done required configuration by following some articles but unfortunately, xdebug is not working and not showing anything. I tried to set the break point in my extension and When I start the debug it also loads the website with query string: http://jacksontest.site/?XDEBUG_SESSION_START=19345 but xdebug is not showing any results. Xdebug keep showing the result shown in below screenshot. Even if I refresh the page, it’s not showing anything.

I have installed xdebug helper browser extensions for firefox and chrome as well. I also kept those extensions enabled but still no luck. Could you please help me?

enter image description here

I checked many articles, youtube videos but not able to get it work. There are many developers like me who has just started using the PHP storm but don’t know how to configure and use Xdebug with it.

I would really really appreciate if anyone can help me to set it up.

Thank you.

Articles I followed:
Magento 2 PHPSTORM Xdebug Configuration setup

How to debug Magento 2 code with Xdebug and PhpStorm (Part 1)

How to debug Magento 2 code with Xdebug and PhpStorm (Part 2)

https://medium.com/@mailtoankitgupta/remote-debug-magento-server-using-phpstorm-xdebug-30ba2c79e9b6

Remote debugging Magento with Xdebug and PHPStorm