Показаны сообщения с ярлыком linux. Показать все сообщения
Показаны сообщения с ярлыком linux. Показать все сообщения

среда, 8 октября 2014 г.

CentOS 7 + Apache + Firewall

To make apache visible from network in CentOS 7 you must create some exceptions:
firewall-cmd --permanent --zone=public --add-service=http 
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --reload

вторник, 7 октября 2014 г.

Gnome3 + Vino: VNC Viewer connection failed.

Temporary fix is: settings set org.gnome.Vino require-encryption false

From here: http://unix.stackexchange.com/questions/77885/how-can-i-connect-to-gnome-3-with-a-windows-vnc-client

понедельник, 26 мая 2014 г.

openssh + Cisco

After update OpenSSH cannot connect to Cisco routers (1841, 3550). After some searching on the Web I found a similar bug #1026430 in on Red Hat Bugzilla.Solution was to add KexAlgorithms=diffie-hellman-group1-sha1 option to ssh command while connecting to routeres.
Another method is to create ~/.ssh/config with a couple of lines:

Host bigrouter
        HostName        192.168.0.1
        KexAlgorithms   diffie-hellman-group1-sha1

вторник, 11 марта 2014 г.

How to locate path to a file from an inode number

As for Ext4 filesystem next command should help you:
$ sudo debugfs -R 'ncheck 393094' /dev/sda2 2>/dev/null


Answer source: http://unix.stackexchange.com/questions/35292/quickly-find-which-files-belongs-to-a-specific-inode-number#comment47948_35310

четверг, 27 февраля 2014 г.

Touchpad support in Debian on Dell 7720

1. Download the latest driver source code package from here (currently newest package is 1.3): http://www.dahetral.com/public-download

2. Then run these commands:
sudo apt-get install dkms
tar -xf psmouse-alps-dst-X.X.tbz
sudo mv usr/src/psmouse-alps-dst-X.X/ /usr/src/psmouse-alps-dst-X.X/
sudo dkms add psmouse/alps-dst-X.X
sudo dkms autoinstall
sudo rmmod psmouse && sudo modprobe psmouse

среда, 22 января 2014 г.

DHCP Failover Configuration

Primary server:
failover peer "failover-partner" {
    primary;
    address dhcp-primary.example.com;
    port 519;
    peer address dhcp-secondary.example.com;
    peer port 520;
    max‐response‐delay 60;
    max‐unacked‐updates 10;
    mclt 3600;
    split 128;
    load balance max seconds 3;
}

Secondary server:

failover peer "failover-partner" {
    secondary;
    address dhcp-secondary.example.com;
    port 520;
    peer address dhcp-primary.example.com;
    peer port 519;
    max‐response‐delay 60;
    max‐unacked‐updates 10;
    load balance max seconds 3;
}
Both servers:
omapi-port 7911;
omapi-key omapi_key;
key omapi_key {
    algorithm hmac-md5;
    secret Ofakekeyfakekeyfakekey==;
}
subnet 10.100.100.0 netmask 255.255.255.0 {
    option domain-name-servers 10.0.0.53;
    option routers 10.100.100.1;
    pool {
        failover peer "failover-partner";
        range 10.100.100.20 10.100.100.254;
        }
}
Key generation:
dnssec‐keygen ‐a HMAC‐MD5 ‐b 512 ‐n USER DHCP_OMAPI


Source: https://kb.isc.org/article/AA-00502/31

четверг, 31 октября 2013 г.

How to install Java plugin in Chrome browser under Linux


Just link libnpjp2.so which is in <your-java-dir>/lib/i386 to/opt/google/chrome/plugins (you need to create this directory beforehand).

Example:

mkdir /opt/google/chrome/plugins
cd /opt/google/chrome/plugins

Restart Chrome and enjoy!

вторник, 9 июля 2013 г.

Java: установка проприетарщины на debian

Оказывается, есть замечательный пакет под названием java-package, который позволяет собрать пакеты из файлов .tar.gz, скаченных с http://www.oracle.com
Пример использования:

make-jpkg jre-7u25-linux-x64.tar.gz
sudo dpkg -i oracle-java7-jre_7u25_amd64.deb

среда, 6 марта 2013 г.

Install Sun JDK 1.7 on Debian


There are a couple of things that you need to be sure prior to upgrade. The most important that your app is supported by the latest Sun JDK. Once you are sure start up by downloading the latest JDK package direct from sun.
Using wget:
http://download.oracle.com/otn-pub/java/jdk/7u3-b04/jdk-7u3-linux-x64.tar.gz
In the above example we downloaded the latest 64bit version of JDK for Linux.
Extract the tar file let's say in your /home directory and follow the instructions below:
cd /home/
tar xzvf jdk-7u3-linux-x64.tar.gz
update-alternatives --install /usr/bin/java java /home/jdk1.7.0_03/bin/java 1
update-alternatives --install /usr/bin/javac javac /home/jdk1.7.0_03/bin/javac 1
update-alternatives --set java /home/jdk1.7.0_03/bin/java
update-alternatives --set javac /home/jdk1.7.0_03/bin/javac
That's all, verify that is working properly and that the right binary is called:

$:/home# java -version
java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b04)
Java HotSpot(TM) 64-Bit Server VM (build 22.1-b02, mixed mode)


понедельник, 4 февраля 2013 г.

Monitoring DNS Query with TCPDUMP

В логах DNS-сервера встречались ошибки связанные с резольвированием tassweq. Google подсказал, что такой и подобные запросы генерирует злой троян. Осталось найти зараженную банку. Для этого решил изучить DNS-запросы с этим доменом.

tcpdump -vvv -s 0 -l port 53 | grep tassweq

-s - не обрезать пакет
-l - выводить результаты полинейно в stdout
-vvv - большой объем выводимых данных

среда, 24 октября 2012 г.

Cygwin sshd: проблемы при авторизации


Клиент после успешной авторизации отваливается с сообщением "chmod(/dev/tty1, 0622) failed: Permission denied." в дебаге.

Есть два варианта решения:
Перезапустить sshd:
    1. На сервере с cygwin'ом остановить службу cygwin sshd
    2. Поубивать все процессы sshd
    3. Запустить службу cygwin ssh
Если не помогло, то:
    1. На сервере с cygwin'ом остановить службу cygwin sshd
    2. Поубивать все процессы sshd
    3. Стереть все /etc/ssh*
    4. Заново настроить службу sshd командой ssh-host-config
Взято отсюда: http://serverfault.com/questions/375066/cygwin-sshd-fails-to-allocate-pty-for-some-users

среда, 8 августа 2012 г.

WCCP: Cisco 1841 + Squid

Cisco
interface Vlan2
 ip address 192.168.100.250 255.255.255.0
 ip access-group STUFF in
 ip wccp web-cache redirect in
 ip flow ingress
 ip flow egress
 ip nat inside
 ip virtual-reassembly
 ip tcp adjust-mss 1380
ip nat inside source list WCCP_Server interface Dialer0 overload
ip wccp web-cache redirect-list WCCP_Redirect password foobar
ip access-list standard WCCP_Server
 permit 192.168.100.6
ip access-list extended WCCP_Redirect
 remark ACL for WCCP proxy access
 remark Squid proxies bypass WCCP
 deny   ip host 192.168.100.6 any
 remark LAN clients proxy port 80 only
 permit tcp 192.168.100.0 0.0.0.255 any eq www
 remark all others bypass WCCP
 deny   ip any any

Linux:
ip tunnel add wccp0 mode gre remote 192.168.100.250 local 192.168.100.6 eth0
ifconfig wccp0 192.168.100.6 netmask 255.255.255.255 up
echo 0 >/proc/sys/net/ipv4/conf/wccp0/rp_filter
echo 0 >/proc/sys/net/ipv4/conf/eth0/rp_filter
echo 1 >/proc/sys/net/ipv4/ip_forward
iptables -t nat -A PREROUTING -i wccp0 -p tcp --dport 80 -j REDIRECT --to-port 3128
iptables -t nat -A POSTROUTING -j MASQUERADE

Squid:
http_port 3128 intercept
wccp2_router 192.168.100.250
wccp2_forwarding_method gre
wccp2_return_method gre
wccp2_service standert 0 password=foobar
Основа взята сдесь: http://wiki.squid-cache.org/Features/Wccp2


пятница, 6 июля 2012 г.

Полноценный Elantech touchpad

Дано бук с Debian Wheezy, XFCE4, Elantech Touchpad, который в иксах работает на уровне обычной мышки: нет мультитача, и, соответственно, скрола двух/трех пальцевого тапа. И самое страшное - нет даже одиночного тапа.

Мое решение:
# Xorg -configure
# cp /root/xorg.conf.new /etc/X11/xorg.conf

В /etc/X11/xorg.conf добавил

Section "InputDevice"
        Identifier "Touchpad" # required
        Driver "synaptics" # required
        Option "MinSpeed" "0.5"
        Option "MaxSpeed" "1.0"
        Option "AccelFactor" "0.075"
        Option "TapButton1" "1"
        Option "TapButton2" "2" # multitouch
        Option "TapButton3" "3" # multitouch
        Option "VertTwoFingerScroll" "1" # multitouch
        Option "HorizTwoFingerScroll" "1" # multitouch
        Option "VertEdgeScroll" "1"
        Option "CoastingSpeed" "8"
        Option "CornerCoasting" "1"
        Option "CircularScrolling" "1"
        Option "CircScrollTrigger" "7"
        Option "EdgeMotionUseAlways" "1"
        Option "LBCornerButton" "8" # browser "back" btn
        Option "RBCornerButton" "9" # browser "forward" btn
EndSection
И в секции ServerLayout заменил
InputDevice    "Mouse0" "CorePointer"
на
InputDevice "Touchpad" "CorePointer"


Оригинал с минимальными правками взят здесь: http://wiki.debian.org/SynapticsTouchpad

среда, 4 июля 2012 г.

USB-Flash, Syslinux и загрузка c образа

Была флешка с установленным SystemRescueCD. Захотел добавить пару ISO-образов и грузиться с них.
Потребовалось добавить в /syslinux/syslinux.cfg:

LABEL Kaspersky Boot-CD 10.0 (ISO)
  LINUX memdisk
  INITRD /rescue/rescue.iso
  APPEND iso raw
Это самый простой способ.