1. Список говнокодов пользователя geniewgen

    Всего: 4

  2. bash / Говнокод #17084

    −129

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    /ip firewall filter
    add chain=forward comment="default configuration" connection-state=related
    add action=drop chain=forward comment="default configuration" connection-state=invalid
    add chain=forward comment="default configuration" connection-state=established
    add chain=forward dst-address=0.0.0.0 in-interface=ether1-gateway out-interface=bridge-local protocol=icmp src-address=0.0.0.0
    add action=drop chain=forward comment="drop invalid connections" connection-state=invalid
    add chain=output comment="accept everything to internet" out-interface=ether1-gateway
    add chain=output comment="accept everything to non internet" out-interface=!ether1-gateway
    add chain=output comment="accept everything"
    add chain=forward comment="allow already established connections" connection-state=established
    add chain=forward comment="accept from local to internet" in-interface=!ether1-gateway out-interface=ether1-gateway
    add action=drop chain=udp comment="deny TFTP" dst-port=69 protocol=udp
    add action=drop chain=udp comment="deny PRC portmapper" dst-port=111 protocol=udp
    add action=drop chain=udp comment="deny PRC portmapper" dst-port=135 protocol=udp
    add action=drop chain=udp comment="deny NBT" dst-port=137-139 protocol=udp
    add action=drop chain=input comment="drop ftp brute forcers" dst-port=21 protocol=tcp src-address-list=ftp_blacklist
    add chain=icmp comment="allow echo request" icmp-options=8:0 protocol=icmp
    add chain=icmp comment="allow time exceed" icmp-options=11:0 protocol=icmp
    add chain=icmp comment="allow parameter bad" icmp-options=12:0 protocol=icmp
    add action=drop chain=icmp comment="deny all other types" disabled=yes
    add chain=output content="530 Login incorrect" dst-limit=1/1m,9,dst-address/1m protocol=tcp
    add action=add-dst-to-address-list address-list=ftp_blacklist address-list-timeout=3h chain=output content="530 Login incorrect" protocol=tcp
    add chain=forward dst-port=25 protocol=tcp src-address-list=spammer
    add chain=forward dst-port=25 protocol=tcp src-address-list=spammer
    add action=drop chain=forward dst-port=25 protocol=tcp src-address-list=spammer
    add action=add-src-to-address-list address-list=spammer address-list-timeout=1d chain=forward connection-limit=30,32 dst-port=25 limit=50,5 protocol=tcp \
        src-address-list=!spammer
    add action=drop chain=input comment="drop ssh brute forcers" dst-port=22 protocol=tcp src-address-list=ssh_blacklist
    add action=add-src-to-address-list address-list=ssh_blacklist address-list-timeout=1w3d chain=input connection-state=new dst-port=22 protocol=tcp \
        src-address-list=ssh_stage3
    add action=add-src-to-address-list address-list=ssh_stage3 address-list-timeout=1m chain=input connection-state=new dst-port=22 protocol=tcp \
        src-address-list=ssh_stage2
    add action=add-src-to-address-list address-list=ssh_stage2 address-list-timeout=1m chain=input connection-state=new dst-port=22 protocol=tcp \
        src-address-list=ssh_stage1
    add action=add-src-to-address-list address-list=ssh_stage1 address-list-timeout=1m chain=input connection-state=new dst-port=22 protocol=tcp
    add action=drop chain=input comment="drop telnet brute forcers" dst-port=23 protocol=tcp src-address-list=telnet_blacklist
    add action=add-src-to-address-list address-list=telnet_blacklist address-list-timeout=1w3d chain=input connection-state=new dst-port=23 protocol=tcp \
        src-address-list=telnet_stage3
    add action=add-src-to-address-list address-list=telnet_stage3 address-list-timeout=1m chain=input connection-state=new dst-port=23 protocol=tcp \
        src-address-list=telnet_stage2
    add action=add-src-to-address-list address-list=telnet_stage2 address-list-timeout=1m chain=input connection-state=new dst-port=23 protocol=tcp \
        src-address-list=telnet_stage1
    add action=add-src-to-address-list address-list=telnet_stage1 address-list-timeout=1m chain=input connection-state=new dst-port=23 protocol=tcp
    add chain=input comment=vpn dst-address=0.0.0.0 dst-port=1723 in-interface=ether1-gateway protocol=tcp
    /ip firewall nat
    add action=masquerade chain=srcnat comment="default configuration" out-interface=internet

    to alex5252

    geniewgen, 08 Ноября 2014

    Комментарии (3)
  3. bash / Говнокод #12397

    −125

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 53
    54. 54
    55. 55
    56. 56
    57. 57
    58. 58
    59. 59
    60. 60
    61. 61
    62. 62
    63. 63
    64. 64
    65. 65
    66. 66
    67. 67
    68. 68
    69. 69
    70. 70
    71. 71
    72. 72
    73. 73
    74. 74
    75. 75
    76. 76
    77. 77
    server {
            listen   80;
            root /srv/websrv/www;
            index index.php;
    
            access_log  /srv/websrv/logs/nginx.access.log; #расположение логов данного хоста
    
            server_name server.name.net www.server.name.net;
    
            location / {
                    # This is cool because no php is touched for static content
                    try_files $uri $uri/ /index.php?q=$uri&$args;
            }
    
            location ~ \.php$ {
                    fastcgi_pass   127.0.0.1:9000;
                    fastcgi_index  index.php;
                    fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
                    include        fastcgi_params;
            }
    
    #Работа с phpMyAdmin
    
             location /phpmyadmin {
                   root /usr/share/;
                   index index.php index.html index.htm;
                   location ~ ^/phpmyadmin/(.+\.php)$ {
                           try_files $uri =404;
                           root /usr/share/;
                           fastcgi_pass 127.0.0.1:9000;
                           fastcgi_index index.php;
                           fastcgi_param SCRIPT_FILENAME $request_filename;
                           include /etc/nginx/fastcgi_params;
                   }
                   location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
                           root /usr/share/;
                   }
            }
            location /phpMyAdmin {
                   rewrite ^/* /phpmyadmin last;
            }
    
            # deny access to apache .htaccess files
            location ~ /\.ht
        {
            deny all;
        }
    
    #Это нужно или нет начало
    
    location = /favicon.ico {
                    log_not_found off;
                    access_log off;
            }
    
            location = /robots.txt {
                    allow all;
                    log_not_found off;
                    access_log off;
            }
    
    
    
            location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
                    expires max;
                    log_not_found off;
            }
    
    #Это нужно или нет конец
    
    
    }
    
    
    # Конфиг под wordpress 3.5 + ЧПУ+phpmyadmin
    # Nginx, php-fpm, MySQL, Memcached
    # Протестировано на ubuntu server 12.04

    Этот конфг nginx для wordpress, скинул для друга на проверку.

    geniewgen, 08 Января 2013

    Комментарии (7)
  4. bash / Говнокод #12339

    −124

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 53
    54. 54
    55. 55
    56. 56
    57. 57
    58. 58
    59. 59
    60. 60
    61. 61
    62. 62
    63. 63
    64. 64
    65. 65
    66. 66
    67. 67
    68. 68
    69. 69
    70. 70
    71. 71
    72. 72
    73. 73
    74. 74
    75. 75
    76. 76
    77. 77
    78. 78
    79. 79
    80. 80
    81. 81
    82. 82
    83. 83
    84. 84
    85. 85
    86. 86
    87. 87
    88. 88
    89. 89
    90. 90
    [global] 
       workgroup = workgroup
       netbios name = server
       security = share
       server string = anonymous lan file server
       browseable = yes
    dns proxy = no
    log file = /var/log/samba/log.%m
    panic action = /usr/share/samba/panic-action %d
    unix password sync = yes
     pam password change = yes
     encrypt passwords = true
    map to guest = bad user
       
    
    [torrent]
    path = /home/ewgeniy/torrent
    comment = tottent is tor
    readonly = No
    guest ok = Yes
    
    [share]
    path = /srv/share
    comment = share local
    readonly = No
    guest ok = Yes
    
    [audio]
    path = /srv/audio
    comment = audio local
    readonly = No
    guest ok = Yes
    
    [FTP]
    path = /srv/ftp
    comment = ftp local
    readonly = No
    guest ok = Yes
    
    [wd500gb]
    path = /media/wd500gb
    comment = backup
    readonly = Yes
    guest ok = Yes
    
    [new]
     comment = new disk 120 gb
            path = /media/wd500gb/
            browseable = yes
            writable = yes
            guest ok = yes
    
    [hdd1]
    	writeable = yes
    	path = /media/wd500gb/
    	write list = ewgeniy
    	only user = yes
    	revalidate = yes
    	directory mask = 0777
    	comment = admin
    	valid users = ewgeniy
    	browsable = yes
    	create mode = 0777
    	user = ewgeniy
    
    [zhanna]
            writeable = yes
            path = /home/zhanna/
            write list = zhanna
            only user = yes
            revalidate = yes
            directory mask = 0777
            comment = admin
            valid users = zhanna
            browsable = yes
            create mode = 0777
            user = zhanna
    
    [alex]
            writeable = yes
            path = /home/alex/
            write list = alex
            only user = yes
            revalidate = yes
            directory mask = 0777
            comment = admin
            valid users = alex
            browsable = yes
            create mode = 0777
            user = alex

    конфиг samba

    Не пускает пользователей в свои домашние каталоги из под windows машин.

    geniewgen, 23 Декабря 2012

    Комментарии (48)
  5. bash / Говнокод #9890

    −147

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    sudo apache2 -V
    Server version: Apache/2.2.20 (Ubuntu)
    Server built:   Nov  7 2011 22:48:05
    Server's Module Magic Number: 20051115:28
    Server loaded:  APR 1.4.5, APR-Util 1.3.12
    Compiled using: APR 1.4.5, APR-Util 1.3.12
    Architecture:   32-bit
    Server MPM:     Prefork
      threaded:     no
        forked:     yes (variable process count)
    Server compiled with....
     -D APACHE_MPM_DIR="server/mpm/prefork"
     -D APR_HAS_SENDFILE
     -D APR_HAS_MMAP
     -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
     -D APR_USE_SYSVSEM_SERIALIZE
     -D APR_USE_PTHREAD_SERIALIZE
     -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
     -D APR_HAS_OTHER_CHILD
     -D AP_HAVE_RELIABLE_PIPED_LOGS
     -D DYNAMIC_MODULE_LIMIT=128
     -D HTTPD_ROOT="/etc/apache2"
     -D SUEXEC_BIN="/usr/lib/apache2/suexec"
     -D DEFAULT_PIDLOG="/var/run/apache2.pid"
     -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
     -D DEFAULT_LOCKFILE="/var/run/apache2/accept.lock"
     -D DEFAULT_ERRORLOG="logs/error_log"
     -D AP_TYPES_CONFIG_FILE="mime.types"
     -D SERVER_CONFIG_FILE="apache2.conf"

    geniewgen, 08 Апреля 2012

    Комментарии (5)