To install and configure CouchPotato on a Raspberry PI




CouchPotato is an application server that makes it easy and automatic to download movies and TV series. You can set the quality you want to download, eg. 4K or 1080p, the movie you're looking for and CouchPotato continuously monitor BitTorrent and Usenet sites and download the version you want as soon as it's available.

In this guide, you install CouchPotato on a Raspberry PI minicomputer. Raspberry PIs are great as a CouchPotato server because:

  1. They are energy efficient and fanless. You can run them around the clock to download your trains without worrying about your energy bills.
  2. These are full computers with a desktop environment so you can log and manage them using GUI tools.
  3. They are $ 35 USD!

These reasons make a Raspberry PI an ideal home download server and a great introduction to using Linux if you have not taken the plunge yet.

requirement

You need some things to get your CouchPotato server up and running. They are as follows:

  1. Raspberry PI 3 or 4 (any version).
  2. 16 GB microSD card.
  3. Micro USB charger for Android phones (for the Raspberry PI).
  4. USB keyboard.
  5. HDMI monitor or TV to use a monitor.
  6. USB storage device big enough to hold your movies and TV shows.

During the installation and configuration phase, you access the Raspberry PI with the keyboard and mouse. You'll no longer need them later during your normal use of CouchPotato because you're logging into their web interface or the Raspberry PI desktop.

Install the operating system

Your first task is to install the operating system on the microSD card on which the operating system of the Raspberry PI is located. The operating system we are installing is Raspbian. Raspbian is based on the Debian operating system and is compiled for the ARM CPU that the Raspbian uses.

Navigate to the download page and download the Raspbian Buster with Desktop Image. This is a large 1.1GB file that you need to store on your computer. Do not unpack this file. The software we use to flash it onto the MicroSD card does it for you.

If you're a seasoned Linux user, here are the instructions on the command line to flash the Raspbian image

Everyone else should download and install the software that we will use to flash the microSD card – balenaEtcher. This software is a nice cross-platform application (Windows, OSX and Linux) that will flash SD cards and USB flash drives.

Note that in the next step you will delete all data on the microSD card. Make sure that you have a copy of all data on it before proceeding.

Insert your microSD card into your computer and start balenaEtcher. The simple screen looks like this:

Click on that choose picture Click the button and navigate to the Raspbian image you downloaded and select it. balenaEtcher automatically searches for and selects the microSD card inserted in your computer. Make sure the size specified next to the device selected by balenaEtcher matches the size of your MicroSD card to make sure you are using the microSD card.

When you are ready, beat Lightning!, Flashing the microSD card takes a few minutes. When balenEtcher finishes, remove the microSD card and load it into your Raspberry PI.

Connect the screen and keyboard to your Raspberry PI, and then connect the phone charger. The Raspberry PI is now turned on. Log in with the following information:

  • Username – pi
  • Password – raspberry

Follow the on-screen instructions until you get to the desktop.

You need to open a terminal from the desktop to continue the tutorial.

Automatically mount the USB device

In this section, you configure the PI to automatically bind or bind the USB flash drive to save your movies to it.

Raspbian always specifies the device name / dev / sda to the first USB device that you connect to the Raspberry PI. This allows us to create an entry in the file where the device mount is configured / etc / fstabso that the USB stick on which you have your media is always automatically delivered to the same location.

Before you edit / etc / fstab You must get the UID (User I WOULD) from pi and the GID (Ggroup I WOULD) from user, First, find the UID of pi by executing this command:

sudo grep "Pi" / etc / passwd

This gives an output that looks like this:

pi: x: 1000: 1000: ,,,: / home / pi: / bin / bash

piThe UID of is the first number, i. H. 1000. The following command gets the UID of user:

sudo grep "User" / etc / group

This prints the output:

User: x: 100: pi

The UID of user is 100. Open with this information / etc / fstab with a text editor. Here Nano is used:

sudo nano / etc / fstab

Add a line with the following format:

/ dev / sda1 / home / pi / Downloads vfat umask = 0002, gid =uid =  0 0

Substituting the values ​​we discovered earlier:

/ dev / sda1 / home / pi / Downloads vfat umask = 0002, gid = 100, uid = 1000 0 0

You must use the values ​​from your Raspberry PI.

Finally, we need to change the user and group for `/ home / pi / downloads:

sudo chown -R pi: user / home / pi / downloads
sudo chmod -R 775 / home / pi / downloads

Plug in your USB device and make sure it's automatically mounted / home / pi / downloads, You will be prompted to open a file manager when you connect the USB device that is opened at its mount point; H. / home / pi / downloads,

Installation and configuration of CouchPotato

The recommended way to install CouchPotato on a Linux server is to clone the Git repository. Before you can do this, you must install Git and some additional Python libraries with the following commands:

sudo apt update
sudo apt install git python-lxml python-pip
pip install --upgrade pyopenssl

Next, you need to clone the CouchPotato repository to the root of the clone pi User with the following commands:

CD ~ /
git clone https://github.com/CouchPotato/CouchPotatoServer.git CouchPotato

You can now start the CouchPotato server by simply running the Python script downloaded with the git pull at /home/pi/CouchPotato/CouchPotato.py, This is not an ideal way to manage a service on Linux because it does not start automatically on reboot and you can not restart it properly. Instead, you create a systemd service file that lets you manage CouchPotato as a world-class system service.

The CouchPotato repository contains a systemd service file that we can use with a small change. You must edit the file so that the location of the CouchPotato.py is specified correctly and CouchPotato is running as pi Users. First open the service file with a text editor Nano is used:

nano /home/pi/CouchPotato/init/couchpotato.service

And edit the [Service] Section look like this:

[Service]



ExecStart = / home / pi / CouchPotato / CouchPotato.py
Type = easy
User = pi
Group = pi

Then copy this file / etc / systemd / system /:

sudo cp /home/pi/CouchPotato/init/couchpotato.service / etc / systemd / system /

Let systemd automatically start CouchPotato at boot time:

sudo systemctl activate Couch Potato

You can now start CouchPotato with the following systemd command:

sudo systemctl start couchpotato

You can now log in to CouchPotato while it's running. However, you can not do anything because no "downloaders" are installed and running. A downloader is an external tool that downloads the movies. CouchPotato supports two downloadable protocols. Bittorrent for bittorrents and NZBs from Usenet locations.

You must install and configure these two downloaders before logging in to CouchPotato so that you can start downloading when you log in.

Install and configure a Bittorrent Downloader: Transfer

CouchPotato supports several different bittorrent servers for automatic download of bittorrents. The BitTorrent server that you install in this guide is Transmission because of its ease of installation and low resource requirements.

Transmission is installed with a single one suitable Command:

sudo apt install transmission daemon

The Transfer daemon The server starts automatically, so shut it down before proceeding:

sudo systemctl stops the transmission-daemon.service file

The transfer is executed as a user Debian transmission, This user must be added to user Group, so they have permission to write to the Downloads Directory. To do this, run the following command:

sudo usermod -on -G user Debian transfer

Finally, you must change the password CouchPotato must use to access the broadcast server. This is stored in a configuration file as /etc/transmission-daemon/settings.json, Open this file with a text editor:

sudo nano /etc/transmission-daemon/settings.json

Then find the line that looks like this:

    "rpc-password": "{2f889e06ebec2515e6db5a8c70cec6fe8d89a50dUVQqNg9z",

And change everything between the second set of language tags to a new password. Write down the new password.

Finally, start the transfer server:

sudo systemctl start transmission-daemon.service

The BitTorrent downloader is now configured and running.

Install and configure a Usenet downloader: NZBGet

Install NZBGet with the following command:

sudo apt install nzbget

Next, you must set a unique password for NZBGet, because unlike Transmission during installation, a unique password is not generated. Open the NZBGet configuration file with a text editor:

sudo nano /etc/nzbget.conf

And scroll down until you find this line:

ControlPassword = tegbzn6789

Then change tegbzn6789 for a new password. Write down this password, save it and quit the text editor.

Finally, you must create a systemd-unit file for NZBGet so that it can be managed by systemd. Open the service file with a text editor:

sudo nano /etc/systemd/system/nzbget.service

And add the following:

[Unit]



Description = NZBGet
After = network.target

[Service]
ExecStart = / usr / bin / nzbget -D
ExecStop = / usr / bin / nzbget -Q
ExecReload = / bin / kill -HUP $ MAINPID
User = pi
KillMode = process
Type = forks

[Install]
WantedBy = multi-user.target

Then activate and start NZBGet:

sudo systemctl activate nzbget.service
sudo systemctl start nzbget.service

The Usenet downloader is now configured and running. You can log in to CouchPotato, perform the initial configuration, and start using it.

Sign in to CouchPotato

CouchPotato is now running and monitoring the public IP address of the Raspberry PI. You will need to retrieve the IP of the Raspberry PI so you can log in to CouchPotato. In the open terminal, run the following command:

Host name -I

The IPv4 IP address will be listed first. Take this IP address and create a URL that has the same format as the following:

http: //: 5050

Replace With an example of a private network IP, we get the sample URL:

http://192.168.0.3:5050

Enter this into a browser on your computer that is on the same local network as your Raspberry PI.

When you log in to CouchPotato for the first time, the page of the configuration wizard appears. Here we will work from top to bottom to configure CouchPotato.

Username and password

In the first section, you can set a username and password for CochPotato. This is not mandatory, but is recommended.

Configure NZBGet

Scroll a little further down in the Which download apps do you use? Section until you see the highlighted line NZBGet, Turn on the switch on the right to enable this downloader. This will bring up three dialog boxes:

  • Host – leave this value localhost: 6789
  • Password – Edit this with the password you have set in Install and configure a Usenet downloader: NZBGet Section.
  • Category – Select a category to include in CouchPotato and view these downloads.

Configure transmission

Transmission is the line under NZBGet. Turn on the switch on the right to enable transmission.

When you toggle the switch, a dialog box appears with the following four boxes:

  • Host – leave this value http: // localhost: 9091
  • Username – Leave this value transmission
  • Password – Copy the password that you have in the Install and configure a Bittorrent Downloader: Transfer section
  • Directory – selects the directory where your downloads will be saved. If you click on this field, a new field will be opened in which all directories will be displayed below the user piHome directory. Choose Downloads Directory.

When done, the section Transfer should look like this:

Select Additional Torrent Providers

CouchPotato is preconfigured to access torrent sites to search for the movies you want to download. The more you activate, the faster CouchPotato can find the films you want. Most of the websites listed require a registered account, which you must sign up for.

The following websites do not need a registered account, so they can speed up your search immediately:

  • KickAssTorrents
  • YTS
  • ThePirateBay
  • MagnetDL
  • NZBClub (Free NZB Site)
  • Binsearch (free NZB page)

You can now use CouchPotato. Just hit it

Enable the VNC Remote Desktop

VNC is an open source version of the Windows Remote Desktop protocol. It allows a person to log into the desktop environment of a remote computer, such as your Raspberry Pi. If you have VNC enabled, you do not need to use a keyboard and mouse to access the desktop of your Raspberry PI.

The default Raspbian image contains all the VNC components, so you do not have to install anything, you need to enable it.

Open a terminal on the Raspbian desktop and enter the following command:

sudo raspi-config

This opens a command line menu. Use the up and down arrows and enter to navigate through the menus. Proceed as follows:

  1. To mark Interface Options and press Enter.
  2. To mark P3 VNC and press Enter.
  3. Press Enter for ,
  4. To confirm ,
  5. Use the TAB Highlight key and press Enter to exit the program.

You can now log in to your Raspberry PI desktop using the VNC viewer. Download this application, install it on your local computer and use the IP address of your Raspberry PI to log in as pi Users.

Move your movies to your computer

Once your downloads are complete, you must move the movies and TV shows to your main computer for viewing. Here we look at two simple ways.

Move the USB device

The first method is to disconnect the USB device from your Raspberry PI, connect it to your local computer, copy the data, and then reconnect it to the Raspberry PI.

The following procedure ensures that you will not damage the data on the USB device.

  1. Log into the desktop of your Raspberry PI using the VNC Viewer application linked to it Enable the VNC Remote Desktop Section.
  2. Shut down the Raspberry PI.
  3. Disconnect the USB.
  4. Plug the USB device into your local computer.
  5. Copy your data to the device and to your computer.
  6. Eject or unmount the USB device.
  7. Disconnect the USB device.
  8. Plug the USB device into the Raspberry PI.
  9. Disconnect the Raspberry PI power cable and plug it back in.

Copy files over the network

Your Raspberry PI is connected to the local network, so you can transfer your media to it over the network instead of manually moving the USB stick to your computer to copy the files.

The best program to safely transfer files from your Windows computer to the Raspberry PI is called WinSCP. Follow this link to download, install and open WinSCP.

WinSCP opens the following dialog box:

Fill in the fields as follows:

  • host – Enter the IP of your Raspberry PI.
  • username – Enter pi,
  • password – Enter the password for the user pi,

click save up and create a bookmark for the Raspberry PI. Finally meet registration to log in to your Raspberry PI.

Use the address bar in the right pane to navigate / home / pi / downloads, You can download your movies and TV shows from this directory and then delete them after you have them on your computer.




To configure an Autosys job as job and time dependent

I have a few Autosys jobs that run daily. One job is job-dependent and another is time-dependent.

But I want both jobs to be both time and work dependent. Is it reachable by accident?


Current scenario

The job-dependent Job1 runtime configuration looks like this:

,
,
,
Date Conditions: 0
Condition: s (Job0)
,
,
,

The time-dependent Job2 runtime configuration looks like this:

,
,
,
Date Conditions: 1
Days of the week: all
start_times: "20:30"
,
,
,

Expected scenario

The runtime configuration of both jobs should be changed to include both job dependency and time dependency. Something like that:

,
,
,
Date Conditions: 2
Condition: s (Job0)
Days of the week: all
start_times: "20:30"
,
,
,

c ++ – To configure a usable kit for Qt after reinstalling Visual Studio 2017

I reinstalled Visual Studio 2017 and could not configure a working kit for Qt.

At the beginning, I had both Qt5.9.8 MSVC2017_64bit and Visual Studio 2017 installed on my computer. They just worked well. Then I upgraded Visual Studio to 2019 and uninstalled VS2017. Then my Qt Creator collapsed. When I try to open a previously created Qt project, only the message "No valid kits found" appears.

I tried to reinstall something "necessary" and restore something to make Qt work. So I opened Visual Studio Installer, checked to install the latest v141 tools from Visual Studio Enterprise 2017 single component "VC ++ 2017 Version 15.9 v14.16". Then I opened Qt Creator 4.8.2, Menu-> Tools-> Kits, manually added a clang-cl C and C ++ compiler, and set the compiler path to "C: Program Files (x86) Microsoft Visual." Studio 2017 VC Tools MSVC 14.16.27023 bin Hostx64 x64 cl.exe "fixed." I also tried some combinations of Hostx64, Hostx86, and x64, x86 when selecting the path, but none of they had success.

I also heard and tested Qt VS Tools.

Related Environments:

Microsoft Visual Studio 2019 Enterprise

Microsoft Visual Studio 2008 Professional (whose compiler was automatically detected in Qt but is not usable)

Qt 5.9.8 MSVC2017_64bit

Would someone tell me what I can do to solve this problematic problem? Thanks (and sorry for my bad language)!

Cisco Netflow v9 Router – How do I configure the exported data?

I'm trying to configure my exported netflow data to include another field – DIRECTION (id = 61).

Currently the format is as follows:

FIRST_SWITCHED
LAST_SWITCHED
IN_BYTES
IN_PKTS
INPUT_SNMP
OUTPUT_SNMP
IPV4_SRC_ADDR
IPV4_DST_ADDR
PROTOCOL
SRC_TOS
L4_SRC_PORT
L4_DST_PORT
FLOW_SAMPLER_ID
IPV4_NEXT_HOP
DST_MASK
SRC_MASK
TCP_FLAGS      

I want it to look like this:

FIRST_SWITCHED
LAST_SWITCHED
IN_BYTES
IN_PKTS
INPUT_SNMP
OUTPUT_SNMP
IPV4_SRC_ADDR
IPV4_DST_ADDR
PROTOCOL
SRC_TOS
L4_SRC_PORT
L4_DST_PORT
FLOW_SAMPLER_ID
IPV4_NEXT_HOP
DST_MASK
SRC_MASK
TCP_FLAGS
DIRECTION // Does not have to be finished, can be anywhere!

How do I do that?

If I need more information to solve my problem, just ask.

ssl – How to configure HTTPS on Ubuntu 16.04, which has a Node.JS and a socket.io server installed

I have a Ubuntu 16.04 server in Digital Ocean. I use that to host my application, which is under my domain name. I want to use HTTPS for my domain. I've used this tutorial to add Let's Encrypt to my domain and make it secure.

https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-16-04

I can say that HTTPS has been added. However, when trying to access my REST API through my AngularJS frontend, some errors occurred. Connection not possible, 404 errors etc.

I'd like to know how to add HTTPS to my Ubuntu 16.04 server, which has a Node.JS REST API, a socket server, and a MySQL database server. Do we need to add a reverse proxy? I've seen this with some examples, but I do not know how to use it. Is there a complete tutorial on this?

Please help me with this. I just want to add HTTPS to my server, node.js server, and need to connect to my node.js server with my Web + Mobile clients.

Routing – Configure the Linux box properly with 2 network cards and 2 subnets, so that two subnets can ping each other

I have a configuration like the following diagram. How can I get Machine A and Machine B to ping each other?

        + -------------------------------- + + ------------- +
| Server | | Machine A |
+ -------------- + ----------------- + + ------------- +
| | eno2 | - | 10.42.0.131 |
| eno1 | 10.42.0.1/24 | + ------------- +
<- | Internet + ----------------- +
| 174.xx.xx.xx | wlx00c0ca97ff94 | + ------------- +
| | 10.42.1.1/24 | - | Machine B |
+ -------------- + ----------------- + + ------------- +
| 10.42.1.100 |
+ ------------- +

Here are the settings. Currently, both machine A and B can access the Internet.

On the server:

$ ip a
1: lo:  mtu 65536 qdisc noqueue state UNKNOWN group standard qlen 1000
link / loopback 00: 00: 00: 00: 00: 00 brd 00: 00: 00: 00: 00: 00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 :: 1/128 scope host
valid_lft forever preferred_lft forever
2: eno1:  mtu 1500 qdisc mq state UP group default qlen 1000
link / ether xx: xx: xx: xx: xx: xx brd ff: ff: ff: ff: ff: ff
inet 174.xx.xx.xx / 24 brd 174.xx.xx.xx.xx scope global dynamic noprefixroute eno1
valid_lft 85354sec preferred_lft 85354sec
inet6 ...
3: eno2:  mtu 1500 qdisc mq state UP group default qlen 1000
link / ether xx: xx: xx: xx: xx: xx brd ff: ff: ff: ff: ff: ff
inet 10.42.0.1/24 brd 10.42.0.255 scope global noprefixroute eno2
valid_lft forever preferred_lft forever
inet6 ...
4: ibp3s0:  mtu 4092 qdisc pfifo_fast state DOWN group default qlen 256
link / infiniband 80: 00: 02: 08: fe: 80: 00: 00: 00: 00: 00: 00: 00: 02: c9: 03: 00: 28: 54: d1 brd 00: ff: ff: ff : ff: 12: 40: 1b: ff: ff: 00: 00: 00: 00: 00: 00: ff: ff: ff: ff
5: ibp3s0d1:  mtu 4092 qdisc pfifo_fast state DOWN group default qlen 256
link / infiniband 80: 00: 02: 09: fe: 80: 00: 00: 00: 00: 00: 00: 00: 02: c9: 03: 00: 28: 54: d2 brd 00: ff: ff: ff : ff: 12: 40: 1b: ff: ff: 00: 00: 00: 00: 00: 00: ff: ff: ff: ff
6: wlx00c0ca97ff84:  mtu 1500 qdisc mq state UP group default qlen 1000
link / ether xx: xx: xx: xx: xx: xx brd ff: ff: ff: ff: ff: ff
inet 10.42.1.1/24 brd 10.42.1.255 scope global noprefixroute wlx00c0ca97ff84
valid_lft forever preferred_lft forever
inet6 ...
7: docker0:  mtu 1500 qdisc noqueue status DOWN group default
link / ether 02: 42: 52: f3: c7: b8 brd ff: ff: ff: ff: ff: ff
inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
valid_lft forever preferred_lft forever
8: docker_gwbridge:  mtu 1500 qdisc noqueue status UP group default
link / ether 02: 42: 36: 24: f6: b8 brd ff: ff: ff: ff: ff: ff
inet 172.18.0.1/16 brd 172.18.255.255 scope global docker_gwbridge
valid_lft forever preferred_lft forever
inet6 ...
14: vetha5c1043@if13:  mtu 1500 qdisc noqueue master docker_gwbridge status UP group default
link / ether 42: 66: 00: a9: f7: f1 brd ff: ff: ff: ff: ff: ff link-netnsid 1
inet6 ...

$ ip route
Default via 174.xx.xx.xx dev eno1 proto dhcp metric 101
10.42.0.0/24 dev eno2 proto kernel scope link src 10.42.0.1 metric 100
10.42.1.0/24 dev wlx00c0ca97ff84 proto kernel scope link src 10.42.1.1 metric 100
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
172.18.0.0/16 dev docker_gwbridge proto kernel scope link src 172.18.0.1
174.xx.xx.xx / 24 dev eno1 proto kernel scope link src 174.xx.xx.xx metric 101

$ sudo iptables -t nat -n -L -v
Chain PREROUTING (Policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt ​​in out source destination
136 9959 DOCKER all - * * 0.0.0.0/0 0.0.0.0/0 ADDRTYPE is the same as dst-type LOCAL

Chain INPUT (Policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt ​​in out source destination

Chain POSTROUTING (Policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt ​​in out source destination
42 2642 MASQUERADE all - * * 10.42.1.0/24! 10.42.1.0/24
0 0 MASQUERADE all - *! Docker0 172.17.0.0/16 0.0.0.0/0
0 0 MASQUERADE all - *! Docker_gwbridge 172.18.0.0/16 0.0.0.0/0
70 5030 MASQUERADE all - * * 10.42.0.0/24! 10.42.0.0/24

Chain OUTPUT (Policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt ​​in out source destination
2 144 DOCKER all - * * 0.0.0.0/0! 127.0.0.0/8 ADDRTYPE is the same as dst-type LOCAL

Chain DOCKER (2 references)
pkts bytes target prot opt ​​in out source destination
0 0 RETURN all - docker0 * 0.0.0.0/0 0.0.0.0/0
0 0 RETURN all - docker_gwbridge * 0.0.0.0/0 0.0.0.0/0

$ sudo sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 1

$ ping -c 1 10.42.0.131
PING 10.42.0.131 (10.42.0.131) 56 (84) Data bytes.
64 bytes from 10.42.0.131: icmp_seq = 1 ttl = 64 time = 0.174 ms

--- 10.42.0.131 ping statistics ---
1 packets sent, 1 received, 0% packet loss, 0ms time
rtt min / avg / max / mdev = 0.174 / 0.174 / 0.174 / 0.000 ms

$ ping -c 1 10.42.1.100
PING 10.42.1.100 (10.42.1.100) 56 (84) Data bytes.
64 bytes from 10.42.1.100: icmp_seq = 1 ttl = 64 time = 193 ms

--- 10.42.1.100 ping statistics ---
1 packets sent, 1 received, 0% packet loss, 0ms time
rtt min / avg / max / mdev = 193,386 / 193,386 / 193,386 / 0,000 ms

On machine A:

$ ip a
1: lo:  mtu 65536 qdisc noqueue state UNKNOWN group standard qlen 1000
link / loopback 00: 00: 00: 00: 00: 00 brd 00: 00: 00: 00: 00: 00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 :: 1/128 scope host
valid_lft forever preferred_lft forever
2: wlp108s0:  mtu 1500 qdisc mq state DOWN group default qlen 1000
link / ether 36: 8c: dc: 2c: ef: 8d brd ff: ff: ff: ff: ff: ff: ff
3: enxe4b97abdf30e:  mtu 1500 qdisc pfifo_fast status UP group default qlen 1000
link / ether xx.xx.xx.xx brd ff: ff: ff: ff: ff: ff
inet 10.42.0.131/24 brd 10.42.0.255 scope global dynamic enxe4b97abdf30e
valid_lft 2025sec preferred_lft 2025sec
inet6 ...

$ ip route
Default over 10.42.0.1 dev enxe4b97abdf30e proto static metric 100
10.42.0.0/24 dev enxe4b97abdf30e proto kernel scope link src 10.42.0.131 metric 100

$ sudo sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 1

$ ping -c 1 10.42.1.1
PING 10.42.1.1 (10.42.1.1) 56 (84) Data bytes.
64 bytes as of 10.42.1.1: icmp_seq = 1 ttl = 64 time = 1.51 ms

--- 10.42.1.1 ping statistics ---
1 packets sent, 1 received, 0% packet loss, 0ms time
rtt min / avg / max / mdev = 1.517 / 1.517 / 1.517 / 0.000 ms

$ ping -c 1 10.42.1.100
PING 10.42.1.100 (10.42.1.100) 56 (84) Data bytes.
From 10.42.0.1 icmp_seq = 1 destination port not available

--- 10.42.1.100 ping statistics ---
1 packets sent, 0 received, +1 error, 100% packet loss, 0ms time

On machine B:

$ ip a
...
23: wlan0:  mtu 1500 qdisc mq state UP group default qlen 3000
link / ether xx.xx.xx.xx brd ff: ff: ff: ff: ff: ff
inet 10.42.1.100/24 ​​brd 10.42.1.255 scope global dynamic wlan0
valid_lft 2025sec preferred_lft 2025sec
inet6 ...
...

$ ip route
10.42.1.0/24 dev wlan0 proto kernel scope link src 10.42.1.100

$ ping -c 1 10.42.0.1
PING 10.42.0.1 (10.42.0.1) 56 (84) Data bytes.
64 bytes as of 10.42.0.1: icmp_seq = 1 ttl = 64 time = 29.4 ms

--- 10.42.0.1 ping statistics ---
1 packets sent, 1 received, 0% packet loss, 0ms time
rtt min / avg / max / mdev = 29,469 / 29,469 / 29,469 / 0,000 ms

$ ping -c 1 10.42.0.131
PING 10.42.0.131 (10.42.0.131) 56 (84) Data bytes.
64 bytes from 10.42.0.131: icmp_seq = 1 ttl = 63 time = 19.6 ms

--- 10.42.0.131 ping statistics ---
1 packets sent, 1 received, 0% packet loss, 0ms time
rtt min / avg / max / mdev = 19.619 / 19.619 / 19.619 / 0.000 ms

So how can I make sure that both machines are able to compete with each other rather than in one direction?

(I've found that StackExchange has a lot of similar questions, and because of my poor understanding, I think I have all the things it needs, well, the fact tells me otherwise, and I really do not know what's missing.)

Thank you for your help!

8 – How do I properly configure VS code so that Xdebug can be used with a Drupal VM installation?

I'm working on Windows 10 and trying to use Xdebug with my Drupal 8.7.4 installed on a Drupal VM (Ubuntu 18.04). Xdebug is installed on a remote server with the following configuration (config.yml):

                # XDebug configuration. XDebug is disabled by default to improve performance.
php_xdebug_default_enable: 1
php_xdebug_coverage_enable: 1
php_xdebug_cli_disable: no
php_xdebug_remote_enable: 1
php_xdebug_remote_connect_back: 1
php_xdebug_idekey: VSCODE
php_xdebug_max_nesting_level: 256
php_xdebug_remote_host: "{{ansible_default_ipv4.gateway}}"

To connect I use the PHP debug plugin in VS code. To map the files on the remote server to the correct files on my local machine, I've used the following settings in the launch.json file in VS code:

"pathMappings": {
"/ var / www / drupalvm": "$ {workspaceFolder}"
},

However, running the debugger with set breakpoints does not produce results, although I believe Xdebug works fine on the remote host, at least I believe after reading the following log:

>> Protocol opened at 2019-07-06 10:59:00 I: Check return link for remote connection. I: Header & # 39; HTTP_X_FORWARDED_FOR & # 39; check. I: check header
> & # 39; REMOTE_ADDR & # 39 ;. I: remote address found, connection to
192.168.88.1:9000. I: Connected to the client. :-)
> ->  fileuri = "file: ///var/www/drupalvm/drupal/web/index.php" language = "PHP"
> xdebug: language_version = "7.2.19-1 + ubuntu18.04.1 + deb.sury.org + 1"
> protocol_version = "1.0" appid = "812" idekey = "PHPSTORM"> version = "2.6.0">    Rethans]]>



>
> <- breakpoint_list -i 1
> ->  transaction_id = "1">
>
> <- breakpoint_set -i 2 -t line -f
> file: ///var/www/drupalvm/drupal/web/index.php -n 15
> ->  transaction_id = "2" id = "8120001">
>
> <- breakpoint_list -i 3
> ->  transaction_id = "3"> filename = "file: ///var/www/drupalvm/drupal/web/index.php" lineno = "15"
> state = "enabled" hit_count = "0" hit_value = "0"
> id = "8120001">



>
> <- breakpoint_list -i 4
> ->  transaction_id = "4"> filename = "file: ///var/www/drupalvm/drupal/web/index.php" lineno = "15"
> state = "enabled" hit_count = "0" hit_value = "0"
> id = "8120001">



>
> <- run -i 5
> ->  transaction_id = "5" status = "stopping" reason = "ok">
>
> <- stop -i 6
> ->  transaction_id = "6" status = "stops" reason = "ok">

Am I correct in assuming that the break-poits are set but never hit in the VS-code? I've double-checked the "pathmappings" setting in launch.json and it's fine. What could I do wrong here?

apache2 – Configure PHP in Apache 2.2 in Ubuntu

  1. I have Apache 2.4 (get installed with apt) and 2.2 (manually installed) on my computer.
  2. I have PHP versions 7.3.6 and 5.6 installed.
  3. Apache 2.4 with PHP version 7.3.6 was successfully configured in port 80.

Now I am trying to configure PHP 5.6 on Apache 2.2 in port 81. I have completed the following steps.

  • I copied /usr/lib/apache2/modules/libphp5.6.so into modules /
    portfolio
  • The following changes have been made to httpd.conf

    LoadModule php5_module modules / libphp5.6.so

    SetOutputFilter PHP
    SetInputFilter PHP
    LimitRequestBody 9524288

    AddType application / x-httpd-php .php
    AddType application / x-httpd-php-source .phps

When I try to start my Apache 2.2, the system displays the following error.

sudo / opt / webserver / bin / apachectl start

httpd: syntax error on line 423 of /opt/webserver/conf/httpd.conf:
/Opt/webserver/modules/libphp5.6.so can not be loaded into the server:
/opt/webserver/modules/libphp5.6.so: undefined icon: ap_log_error_

Please let me know what I'm doing wrong and suggest a solution. Thank you in advance.

iptables – To configure dnsmasq so that only a specific IP address on the interface it is listening to has access to the Internet

Can someone help me with this problem:
I'm currently running the dnsmasq service on Raspbian (Raspberry Pi) to share the Pi's Internet access with devices that connect to its LAN port and identify themselves as eth0. The /etc/dnsmasq.conf file was configured as follows:

interface = eth0 # Use the eth0 interface
listen-address = 192.168.10.1 # Specify the address to be listened to
bind-interfaces # Bind to the interface
server = 8.8.8.8 # Use Google DNS
Domain required # Do not forward nicknames
bogus-priv # Delete the undelivered address spaces.
DHCP range = 192.168.10.100.192.168.10.199,12h # IP range and lease time

Follow the tutorial on this link: https://pimylifeup.com/raspberry-pi-wifi-bridge/

Currently, this works as expected, but I have to limit my Internet access to just one device identified by its static IP address 192.168.10.10

Can someone help me how to do that?

Thank you in advance.