Official Raspberry DSI 7″ Display not working

Posted: 18th Ноябрь 2021 by shmyak in Пингвин
Tags: ,
Комментарии к записи Official Raspberry DSI 7″ Display not working отключены

This appears to be an I2C issue on Pi3 (and possibly earlier, but not Pi4) that causes the touchpanel regulator to lock up.

Adding «dtparam=i2c_vc_baudrate=50000» and «enable_uart=0» to /boot/config.txt seems to fix it for now, and I’ll look at what’s actually going on.

Connecting and Programming Your Digispark

Posted: 21st Сентябрь 2021 by shmyak in arduino, Пингвин
Комментарии к записи Connecting and Programming Your Digispark отключены

http://digistump.com/wiki/digispark/tutorials/connecting

https://startingelectronics.org/tutorials/arduino/digispark/digispark-linux-setup/

Add udev Rules to the System

sudo vim /etc/udev/rules.d/49-micronucleus.rules

# UDEV Rules for Micronucleus boards including the Digispark.
# This file must be placed at:
#
# /etc/udev/rules.d/49-micronucleus.rules    (preferred location)
#   or
# /lib/udev/rules.d/49-micronucleus.rules    (req'd on some broken systems)
#
# After this file is copied, physically unplug and reconnect the board.
#
SUBSYSTEMS=="usb", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="0753", MODE:="0666"
KERNEL=="ttyACM*", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="0753", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1"
#
# If you share your linux system with other users, or just don't like the
# idea of write permission for everybody, you can replace MODE:="0666" with
# OWNER:="yourusername" to create the device owned by you, or with
# GROUP:="somegroupname" and mange access using standard unix groups.

chmod 644 49-micronucleus.rules

sudo udevadm control --reload-rules

ssh public key and google authenticator

Posted: 4th Февраль 2019 by shmyak in Пингвин
Комментарии к записи ssh public key and google authenticator отключены

/etc/ssh/sshd_config

ChallengeResponseAuthentication yes
UsePAM yes
AuthenticationMethods publickey,keyboard-interactive:pam
PasswordAuthentication no

/etc/pam.d/sshd

#@include common-auth
auth required /usr/local/lib/security/pam_google_authenticator.so

Туннель ssh

Posted: 12th Апрель 2018 by shmyak in Пингвин
Комментарии к записи Туннель ssh отключены

Дано: сервер локальной сети ourproxy.provider.ru, доступный извне.

Требуется: получить из дома доступ к ресурсам внутри локальной сети, например,
к интранет-серверу 10.10.5.1:80

Решение: выполнить на домашней машине команду, пробрасывающую туннель к
искомому IP-адресу через ourproxy.provider.ru:

ssh -f -N user@ourproxy.provider.ru -L 8080:10.10.5.1:80

Опция -f говорит ssh, что после соединения нужно уйти в background.
Опция -N указывает, что никаких команд выполнять не нужно
Ключ -L означает, что соединения к localhost на порт 8080 нужно перенаправлять
на 80 порт IP-адреса 10.10.5.1

Таким образом, набирая в браузере адрес http://localhost:8080, попадаем на нужный сервер.

https://www.opennet.ru/tips/1691_ssh_tunnel_socks.shtml

linux vlan

Posted: 28th Июнь 2017 by shmyak in Пингвин
Комментарии к записи linux vlan отключены

loose_binding on|off gvrp on|off
ingress-qos-map FROM:TO egress-qos-map FROM:TO

how to disable ipv6

Posted: 28th Июнь 2017 by shmyak in Пингвин
Комментарии к записи how to disable ipv6 отключены

Here’s how to disable the protocol on a Red Hat-based system:

To re-enable IPv6, issue the following commands:

Here’s how to disable the protocol on a Debian-based machine.

1. Open a terminal window.

2. Issue the command sudo nano /etc/sysctl.conf

3. Add the following at the bottom of the file:

4. Save and close the file.

5. Reboot the machine.

To re-enable IPv6, remove the above lines from /etc/sysctl.conf and reboot the machine.

samba server

Posted: 22nd Апрель 2017 by shmyak in Пингвин
Комментарии к записи samba server отключены

Add Samba users

Samba uses it’s own password system so users need to be added by root. Note that the users have to exist in /etc/passwd

You will be prompted for a password for each of those users.

To list existing Samba users:

Restart the Samba daemon

or, if you are using systemd

Try to access the shares (as a normal user)

Try locally first, then from another machine on the network which also installed samba client. When prompted, use the password entered when adding the user to Samba.

To access my share:

To access your share:

To access our shared(!) share:

#https://wiki.debian.org/SambaServerSimple

mount smb dir from remote machine:

Второй вариант без авторизации.

OrangePi PLUS. WiFi

Posted: 6th Октябрь 2016 by shmyak in Пингвин

To enable wifi connection from command line run: sudo nmcli -a d wifi connect and enter your wifi credentials

Зло! apt-get remove network-manager (:

/etc/wpa_supplicant.conf

/etc/network/interfaces

Fedora:
https://ask.fedoraproject.org/en/question/59278/how-can-i-enable-wpa_supplicant-on-boot/

Лицензии в cisco

Posted: 15th Сентябрь 2016 by shmyak in Пингвин

1. IOS не NPE, т.е. без NPE в назнавнии, т.е., например, вот такой: c2900-universalk9-mz.SPA.151-3.T.bin. У вас — нпе. http://pig.lsd-25.ru/uploads/ios/ (меня разбанили)
2. ИОС не ниже версий: 15.0(1)M4, 15.1(1)T2, 15.1(2)T2, 15.1(3)T. У вас — сами угадаете?
3. Зайти на роутере в привелегированный режим и в режим глобальной конфигурации. Это может быть проблемой. Но это обязательное условие.
4. Ползуясь подсказками (нажимая кнопку «?») написать что-то вроде:
license boot module c2900 technology-package securityk9
license boot module c2900 technology-package uck9
license boot module c2900 technology-package datak9
и после вводка каждой из строк согласиться с EULA.
5. Выйти из режима глобального конфигурирования.
6. Сохранить конфигурацию командой copy system:running-config nvram:startup-config
7. Ответить утвердительно на команду reload.
8. Получить профит.

#sh ver

#sh lic

 

http://www.anticisco.ru/forum/viewtopic.php?f=2&t=1615&sid=8efe01d4a3dfc3aa990a78d206f8276f

L2TP over IPsec on Cisco IOS Router

Posted: 15th Сентябрь 2016 by shmyak in Пингвин

Configuration on Cisco IOS router:

version 12.4

!

hostname L2TP

!

!

aaa new-model

!

!

aaa authentication ppp VPDN_AUTH local

!

!

vpdn enable

!

vpdn-group L2TP

! Default L2TP VPDN group

accept-dialin

protocol l2tp

virtual-template 1

no l2tp tunnel authentication

!

!

!

username cisco privilege 15 password 0 cisco

!

!

crypto isakmp policy 1

encr 3des

hash sha

authentication pre-share

group 2

lifetime 86400

!

!

crypto isakmp key cisco123 address 0.0.0.0 0.0.0.0

!

!

crypto ipsec transform-set L2TP-Set2 esp-3des esp-sha-hmac

mode transport

!

crypto dynamic-map dyn-map 10

set nat demux

set transform-set L2TP-Set2 L2TP-Set

!

!

crypto map outside_map 65535 ipsec-isakmp dynamic dyn-map

!

!

!

interface Loopback0

ip address 192.168.47.1 255.255.255.0

ip nat inside

ip virtual-reassembly

!

interface Loopback1

description loopback for IPsec-pool

ip address 1.1.1.11 255.255.255.255

!

interface FastEthernet0/0

ip address 47.47.47.2 255.255.255.0

ip nat outside

ip virtual-reassembly

duplex auto

speed auto

crypto map outside_map

!

!

interface Virtual-Template1

ip unnumbered Loopback1

peer default ip address pool l2tp-pool

ppp authentication ms-chap-v2 VPDN_AUTH

!

!

!

ip local pool l2tp-pool 1.1.1.1 1.1.1.10

ip route 0.0.0.0 0.0.0.0 47.47.47.1

!

ip nat inside source list NAT interface FastEthernet0/0 overload

!

ip access-list extended NAT

deny ip 192.168.47.0 0.0.0.255 1.1.1.0 0.0.0.255

permit ip 192.167.47.0 0.0.0.255 any

!

!

!

End

 

https://supportforums.cisco.com/document/9878401/l2tp-over-ipsec-cisco-ios-router-using-windows-8