Even though you are using pi-hole to stop showing ads which should speed-up page loading since it does not need to featch unwanted ad material.
But sometimes slow down your page loading, since many ads are delivered via HTTPS port 443.
Pi-hole only knows about domain being requested and it is blocking the ad domains on DNS level. It is not aware about the specific protocols used for ad delivery. Slowdown can occur waiting for HTTPS request to timeout to unreachable domain because you have blocked it on DNS level.
To speed things up you could use these three simple iptables rules:
iptables -A INPUT -p tcp -s 192.168.1.0/24 --destination-port 443 -j REJECT --reject-with tcp-reset
iptables -A INPUT -p udp -s 192.168.1.0/24 --destination-port 80 -j REJECT --reject-with icmp-port-unreachable
iptables -A INPUT -p udp -s 192.168.1.0/24 --destination-port 443 -j REJECT --reject-with icmp-port-unreachable
In this case my home network is 192.168.1.0 and all request coming from your local clients to pihole on ports 80,443 are rejected which should hopefully result in speedy page loading.
Save the rules in your local boot script or use iptables-save.
I recently bought an Android box to replace my Raspberry Pi 3 player running Xbian.
One of the features I love the most on Raspberry Pi is support for CEC, since I prefer to have only one remote in use. I have controlled Kodi by using my RM-ED060 remote from my Sony Bravia KDL-50W815B that looks like this:
I did some small customization to remote configuration in Kodi on Raspberry pi by hand and I wanted to keep as much of that with my new Android box.
In order to re-map keys I used Kodi add-on called keymap editor which allows you to map almost every key you want.
This is my current gen.xml file that can be found in Android/data/org.xbmc.kodi/files/.kodi/userdata/keymaps/
If you would like to have the same configuration without doing the re-configuration of the keys yourself, you should copy this file to the same directory.
If you are wondering what are those key id definitions, here are all the codes that I was able to identify with keymap editor for this TV:
61448 - Return/Back
61453 - Select/OK
61488 - 0
61489 - 1
61490 - 2
61491 - 3
61492 - 4
61493 - 5
61494 - 6
61495 - 7
61496 - 8
61497 - 9
61568 - Up
61569 - Down
61628 - Stop
61636 - Rew
61637 - Fwd
61638 - Rec
61664 - Guide
61665 - Options
61666 - Info
61667 - Red
61668 - Green
61669 - Yellow
61670 - Blue
61750 - Left
61751 - Right
When Debian based live ISO is booted start terminal and type:
mount -t proc proc /mnt/sda5/proc
mount -t sysfs sys /mnt/sda5/sys
mount -o bind /dev /mnt/sda5/dev
chroot /mnt/sda5 /bin/bash
I decided to replace default Zippy joystick that came with iCade with Sanwa JLF-TP-8Y-MB without mounting plate that fits perfectly into mounting holes in the casing. In order to overcome some configuration issues created by physical mounting of the joystick I needed to look into xboxdrv.
Continue reading “Retropie USB Universal Controller Calibration & Mapping with xboxdrv”
Imagine the situation where you have 2 hosts:
- server – with public IP accessible via Internet
- client – with access to Internet but behind firewall so it is not accessible via Internet
You want to access client via SSH over the Internet but you can not access it because it is behind firewall that does not allow connections to the host via public IP.
My idea was to use reverse SSH tunnel started on client side, so I will be able to access client via server IP.
On your client you need to start SSH connection with something like:
ssh -f -T -N -R SERVER_IP:SERVER_PORT_TO_ACCESS_CLIENT:localhost:CLIENT_PORT_TO_ACCESS user@SERVER_PUBLIC_IP -p SERVER_SSH_PORT
If this works, you could access your client directly from server by using 127.0.0.1 since the reverse tunnel will listen only on localhost.
tcp 0 0 127.0.0.1:9999 0.0.0.0:* LISTEN
So your server is listening on localhost instead on SERVER_IP you ran on the client.
Chech your SSHd server configuration for example in file /etc/ssh/sshd_config following option should be enabled:
If it is not present you need to add it to your sshd_config and restart sshd.
tcp 0 0 0.0.0.0:9999 0.0.0.0:* LISTEN
You will be able to access your client port from any IP on server via port 9999 in this example.