LINUX.ORG.RU

Сообщения Dr0id

 

Открыть порт в политиках Selinux

Приветствую! В настройках named указал открыть порт, Selinux этого сделать не дает, скажите, как подкорректировать правила Selinux дабы открыть порт 8053.

type=AVC msg=audit(1376497840.002:347): avc:  denied  { name_bind } for  pid=5100 comm="named" src=8053 scontext=unconfined_u:system_r:named_t:s0 tcontext=system_u:object_r:port_t:s0 tclass=tcp_socket
type=SYSCALL msg=audit(1376497840.002:347): arch=c000003e syscall=49 success=no exit=-13 a0=14 a1=7fcd62d665f0 a2=10 a3=7fcd62d661d0 items=0 ppid=5098 pid=5100 auid=500 uid=501 gid=501 euid=501 suid=501 fsuid=501 egid=501 sgid=501 fsgid=501 tty=(none) ses=15 comm="named" exe="/usr/sbin/named" subj=unconfined_u:system_r:named_t:s0 key=(null)

 ,

Dr0id
()

Обеспечение безопасности DNS сервера.

Здравствуйте! Поднял DNS сервер с внешним IP, стал актуальным вопрос безопасности и доступности самого сервиса.

Скажите, на что обратить внимание при настройке, сервера и самого Bind. дабы защитить его от внешних атак и неправомерного использования сторонними лицами. Сам DNS+DNS slave нацелен на внутрикорпоративное использование разными сервисами посему рекурсия в мир нужна. Сервер на Centos 6.4.

1) Bind работает с Selinux + chroot .
2) Все порты кроме 53 и SSH закрыты iptables, SSH порт перевешен.
3) Трансфер и Update зон разрешен только с определённого IP.
4) Созданы view зоны в named.conf в которых происходить определение необходимости рекурсии в зависимости от IP клиента.
5) Наверное нужно ограничение внешних соединений по 53 порту, но по каким критериям сечь пока не ясно..
На что еще обратить внимание.. ?

 , , ,

Dr0id
()

DNS, помогите побороть SERVFAIL

Здравствуйте, помогите пожалуйста советом,

Отрабатывает..

[root@ns1 named]# nslookup  90.100.143.43
Server:         90.100.143.43
Address:        90.100.143.43#53

43.143.100.90.in-addr.arpa      name = ns2.ts-domain.ru.
43.143.100.90.in-addr.arpa      name = ns1.ts-domain.ru.

Увы:

[root@ns1 named]# nslookup  ts-domain.ru
Server:         90.100.143.43
Address:        90.100.143.43#53

** server can't find ts-domain.ru: SERVFAIL

Bind9 работает под chroot+Selinux

Далее конфиги...

less /etc/named.conf

options {
        listen-on port 53 { 127.0.0.1; 90.100.143.43; };
        directory       "/var/named";
        dump-file       "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
        allow-query     { any; };
        recursion yes;

        bindkeys-file "/etc/named.iscdlv.key";

        managed-keys-directory "/var/named/dynamic";

};


controls {
    inet 127.0.0.1 port 953
    allow { 127.0.0.1; } keys { "rndc-key"; };
};



logging {
        channel default_debug {
                file "data/named.run";
                severity debug 10;
        };

 channel debug_log {
        file "data/debug.log";
        severity debug 10;
        print-category yes;
        print-severity yes;
        print-time yes;
       };

 channel query_log {
        file "data/query.log";
        severity debug 10;
        print-category yes;
        print-severity yes;
        print-time yes;
    };

 channel client {
        file "data/client.log";
        severity debug 10;
        print-category yes;
        print-severity yes;
        print-time yes;
    };

 channel update {
        file "data/update.log";
        severity debug 10;
        print-category yes;
        print-severity yes;
        print-time yes;
    };

 channel update-security {
        file "data/update-security.log";
        severity debug 10;
        print-category yes;
        print-severity yes;
        print-time yes;
    };

 channel xfer-in {
        file "data/xfer-in.log";
        severity debug 10;
        print-category yes;
        print-severity yes;
        print-time yes;
    };


 channel xfer-out {
        file "data/xfer-out.log";
        severity debug 10;
        print-category yes;
        print-severity yes;
        print-time yes;
    };


 channel config {
        file "data/config.log";
        severity debug 10;
        print-category yes;
        print-severity yes;
        print-time yes;
    };


channel database {
        file "data/database.log";
        severity debug 10;
        print-category yes;
        print-severity yes;
        print-time yes;
    };


channel default {
        file "data/default.log";
        severity debug 10;
        print-category yes;
        print-severity yes;
        print-time yes;
    };



channel dispatch {
        file "data/dispatch.log";
        severity debug 10;
        print-category yes;
        print-severity yes;
        print-time yes;
    };

channel general {
        file "data/general.log";
        severity debug 10;
        print-category yes;
        print-severity yes;
        print-time yes;
    };

channel network {
        file "data/network.log";
        severity debug 10;
        print-category yes;
        print-severity yes;
        print-time yes;
    };

channel notify {
        file "data/notify.log";
        severity debug 10;
        print-category yes;
        print-severity yes;
        print-time yes;
    };

channel resolver {
        file "data/resolver.log";
        severity debug 10;
        print-category yes;
        print-severity yes;
        print-time yes;
    };


    category resolver { resolver; };
    category security { debug_log; };
    category queries { query_log; };
    category client { client; };
    category update { update; };
    category update-security { update-security; };
    category xfer-in { xfer-in; };
    category xfer-out { xfer-out; };
    category config { config; };
    category database { database; };
    category default { default; };
    category dispatch { dispatch; };
    category general { general; };
    category network { network; };
    category notify  { notify; };


};


zone "." IN {
        type hint;
        file "named.ca";
};




include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
include "/var/named/ts-domain.ru";
include "/etc/rndc.key";
include "/var/named/master/ts-domain.ru.key";

less /var/named/ts-domain.ru

zone "ts-domain.ru" IN {
        type master;
        file "/var/named/master/ts-domain.ru";
        allow-update { any; };
        zone-statistics  yes;
};

zone "143.100.90.in-addr.arpa" IN {
        type master;
        file "/var/named/master/ts-domain.ru.rev";
        allow-update { any; };
        zone-statistics  yes;
};

Прямая:

$TTL 57600
$ORIGIN ts-domain.ru.
@ IN  SOA ns1.ts-domain.ru. root.ts-domain.ru. ( 20130801 10800 1200 3600000 3600 )


            IN      NS ns1.ts-domain.ru.
            IN      NS ns2.ts-domain.ru.



ns1         IN       A  90.100.143.43
ns2         IN       A  90.100.143.43
www         IN       A  90.100.143.43
@                    TXT "domain"


mnode01              A 90.100.143.20
esxi5                A 90.100.143.30
ipam                 A 90.100.143.145

Обратная:

$TTL 57600
$ORIGIN  143.100.90.in-addr.arpa.
@ IN  SOA ns1.ts-domain. root.ts-domain. ( 20130801 10800 1200 3600000 3600 )

               NS ns1.ts-domain.
               NS ns2.ts-domain.

43         IN  PTR    ns1.ts-domain.
43         IN  PTR    ns2.ts-domain.




20          IN   PTR mnode01.ts-domain.
30          IN   PTR esxi5.ts-domain.
145         IN   PTR ipam.ts-domain.

 ,

Dr0id
()

А что почитать внемяемого по Selinux

Приветствую!

Я так понимаю, что запуск всякого дырявого ПО в Chroot уходит в прошлое и сейчас вполне себе можно использовать Selinux. Скажите, а что сейчас есть ценного почитать из печатного или электронного по теме..

Мне собственно DNS(Bind)+Selinux...

 ,

Dr0id
()

Растолкуйте по выводу Fdisk на HBA+FC

Приветствую! Есть у меня нода с FC контроллером HP QMH2572 8Gb Fibre Channel на борту. На СХД выделил Lun 50G, поставил туда систему, настроил загрузку по FC, все отлично работает, сомнения вызывает лишь вывод Fdisk:

На котроллере два FС порта, сейчас один в дауне. Т.к пока нет второго SAN свитча. Подскажите откуда такое кол-во устройств в fdisk. ? У меня всего-то один LUN на 50Gb

WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.

Disk /dev/sda: 3790 MB, 3790602240 bytes, 7403520 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: gpt


#         Start          End    Size  Type            Name
 1           64         8191      4M  EFI System
 5         8224       520191    250M  Microsoft basic
 6       520224      1032191    250M  Microsoft basic
 7      1032224      1257471    110M  unknown
 8      1257504      1843199    286M  Microsoft basic

Disk /dev/sdc: 50.0 GB, 49999970304 bytes, 97656192 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 1048576 bytes
Disk label type: dos
Disk identifier: 0x0002835a

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *        2048     1026047      512000   83  Linux
/dev/sdc2         1026048    97654783    48314368   8e  Linux LVM

Disk /dev/sdd: 50.0 GB, 49999970304 bytes, 97656192 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 1048576 bytes
Disk label type: dos
Disk identifier: 0x0002835a

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1   *        2048     1026047      512000   83  Linux
/dev/sdd2         1026048    97654783    48314368   8e  Linux LVM

Disk /dev/sde: 50.0 GB, 49999970304 bytes, 97656192 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 1048576 bytes
Disk label type: dos
Disk identifier: 0x0002835a

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1   *        2048     1026047      512000   83  Linux
/dev/sde2         1026048    97654783    48314368   8e  Linux LVM

Disk /dev/sdb: 50.0 GB, 49999970304 bytes, 97656192 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 1048576 bytes
Disk label type: dos
Disk identifier: 0x0002835a

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        2048     1026047      512000   83  Linux
/dev/sdb2         1026048    97654783    48314368   8e  Linux LVM

Disk /dev/mapper/mpathh: 50.0 GB, 49999970304 bytes, 97656192 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 1048576 bytes
Disk label type: dos
Disk identifier: 0x0002835a

             Device Boot      Start         End      Blocks   Id  System
/dev/mapper/mpathh1   *        2048     1026047      512000   83  Linux
/dev/mapper/mpathh2         1026048    97654783    48314368   8e  Linux LVM

Disk /dev/mapper/mpathh1: 524 MB, 524288000 bytes, 1024000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 1048576 bytes


Disk /dev/mapper/mpathh2: 49.5 GB, 49473912832 bytes, 96628736 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 1048576 bytes


Disk /dev/mapper/fedora-swap: 4294 MB, 4294967296 bytes, 8388608 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 1048576 bytes


Disk /dev/mapper/fedora-root: 45.2 GB, 45176848384 bytes, 88236032 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 1048576 bytes

 , ,

Dr0id
()

Помогите разобраться с роутингом

Приветствую! Есть у меня сервер,  в локальной сети без доступа в интернет. Воткнул я в него  модем YOTA(eth0). Пинги до ya.ru ходят, а вот всякие пакетные менеджеры так работать не хотят.  Приходится прописывать Yota как Default Gateway, но из-за этого отваливается SSH и подключится из локальной сети к серверу я уже не могу..  


eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.166.53  netmask 255.255.255.128  broadcast 192.168.166.127
        inet6 fe80::1260:4bff:fea9:7f88  prefixlen 64  scopeid 0x20<link>
        ether 10:60:4b:a9:7f:88  txqueuelen 1000  (Ethernet)
        RX packets 3101  bytes 218532 (213.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 802  bytes 64391 (62.8 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1400
        inet 10.0.0.10  netmask 255.255.255.0  broadcast 10.0.0.255
        inet6 fe80::209:3bff:fef0:1a40  prefixlen 64  scopeid 0x20<link>
        ether 00:09:3b:f0:1a:40  txqueuelen 1000  (Ethernet)
        RX packets 5  bytes 1040 (1.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 21  bytes 4359 (4.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 656  bytes 73372 (71.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 656  bytes 73372 (71.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


Сейчас route такой:

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.166.1   0.0.0.0         UG    0      0        0 eth0
10.0.0.0        0.0.0.0         255.255.255.0   U     1      0        0 eth1
192.168.166.0   0.0.0.0         255.255.255.128 U     1      0        0 eth0


Каким образом можно настроить роутинг так, чтобы и интернет могли использовать все приложения и SSH локальный не валился? 

 ,

Dr0id
()

Пару вопросов по LUN, к SAN спецам


Приветствую!
Так уж случилось, что столкнулся я с SAN администрированием. Есть у меня  HP  C3000 Blade server с 8-ю лезвиями на борту + Brocade BL SAN switch и отдельный HP SAN switch 8/24.
+ Много хранилок HP MSA P2000 соединенных по FC
Мне для проекта необходимо на одно лезвие залить ОС, чтобы загрузка шла с LUN на хранилище. 
Честно говоря никогда на сталкивался с настройкой SAN поэтому возникли некоторые вопросы:

1)Каким образом создать LUN так чтобы только этот лун был виден лезвию на блейде, а  остальные луны были скрыты.

2)На хранилке можно создать виртуальный диск(raid), а в нем уже Volume определенного размера, это и есть Lun? Или Lun создаётся как-то по другому?

3)На хранилке есть объекты Host, там как я понимаю, указаны все мои лезвия и те луны которые к ним замаплены, я ради эксперимента  размапил у одного лезвия все луны, но почему-то они продолжают быть доступны системе на этом лезвие.. 

4)Не совсем ясно назначение объекта Host на хранилище, зачем нам прописывать все наши лезвия на хранилище по Host ID (WWN/IQN):* ? 

 , ,

Dr0id
()

RSS подписка на новые темы