Dodany przez: hubot, 18:15 12-05-2017

Nowy Pobierz
  1. root@hubot-vps:~# tail /var/log/syslog
  2. May 12 18:08:19 hubot-vps postfix/smtpd[2887]: disconnect from unknown[208.79.218.105]
  3. May 12 18:08:19 hubot-vps postfix/smtpd[2887]: disconnect from unknown[208.79.218.105]
  4. May 12 18:08:27 hubot-vps kernel: [1255643.491579] Shorewall:net-fw:DROP:IN=eth0 OUT= MAC=00:50:56:b8:c4:02:00:16:9c:6f:d4:80:08:00 SRC=109.162.13.89 DST=81.2.239.96 LEN=40 TOS=0x08 PREC=0x20 TTL=57 ID=52666 PROTO=TCP SPT=29073 DPT=23 WINDOW=16807 RES=0x00 SYN URGP=0
  5. May 12 18:08:27 hubot-vps kernel: [1255643.491579] Shorewall:net-fw:DROP:IN=eth0 OUT= MAC=00:50:56:b8:c4:02:00:16:9c:6f:d4:80:08:00 SRC=109.162.13.89 DST=81.2.239.96 LEN=40 TOS=0x08 PREC=0x20 TTL=57 ID=52666 PROTO=TCP SPT=29073 DPT=23 WINDOW=16807 RES=0x00 SYN URGP=0
  6. May 12 18:09:01 hubot-vps CRON[2893]: (root) CMD (  [ -x /usr/lib/php5/sessionclean ] && /usr/lib/php5/sessionclean)
  7. May 12 18:09:01 hubot-vps CRON[2893]: (root) CMD (  [ -x /usr/lib/php5/sessionclean ] && /usr/lib/php5/sessionclean)
  8. May 12 18:09:16 hubot-vps kernel: [1255691.690116] Shorewall:net-fw:DROP:IN=eth0 OUT= MAC=00:50:56:b8:c4:02:00:14:a9:11:7a:80:08:00 SRC=187.75.196.246 DST=81.2.239.96 LEN=44 TOS=0x08 PREC=0x40 TTL=44 ID=41396 PROTO=TCP SPT=38443 DPT=23 WINDOW=36147 RES=0x00 SYN URGP=0
  9. May 12 18:09:16 hubot-vps kernel: [1255691.690116] Shorewall:net-fw:DROP:IN=eth0 OUT= MAC=00:50:56:b8:c4:02:00:14:a9:11:7a:80:08:00 SRC=187.75.196.246 DST=81.2.239.96 LEN=44 TOS=0x08 PREC=0x40 TTL=44 ID=41396 PROTO=TCP SPT=38443 DPT=23 WINDOW=36147 RES=0x00 SYN URGP=0
  10. May 12 18:09:45 hubot-vps kernel: [1255721.019364] Shorewall:net-fw:DROP:IN=eth0 OUT= MAC=00:50:56:b8:c4:02:00:16:9c:6f:d4:80:08:00 SRC=109.162.13.89 DST=81.2.239.96 LEN=40 TOS=0x08 PREC=0x20 TTL=57 ID=52666 PROTO=TCP SPT=29073 DPT=23 WINDOW=16807 RES=0x00 SYN URGP=0
  11. May 12 18:09:45 hubot-vps kernel: [1255721.019364] Shorewall:net-fw:DROP:IN=eth0 OUT= MAC=00:50:56:b8:c4:02:00:16:9c:6f:d4:80:08:00 SRC=109.162.13.89 DST=81.2.239.96 LEN=40 TOS=0x08 PREC=0x20 TTL=57 ID=52666 PROTO=TCP SPT=29073 DPT=23 WINDOW=16807 RES=0x00 SYN URGP=0
  12. root@hubot-vps:~# ip route
  13. default via 81.2.239.1 dev eth0
  14. 10.8.0.0/24 via 10.8.0.2 dev tun0
  15. 10.8.0.2 dev tun0  proto kernel  scope link  src 10.8.0.1
  16. 81.2.239.0/24 dev eth0  proto kernel  scope link  src 81.2.239.96
  17. root@hubot-vps:~# cat /etc/shorewall/tunnels
  18. #TYPE         ZONE        GATEWAY             GATEWAY_ZONE
  19. openvpnserver:7480      net     0.0.0.0/0
  20. root@hubot-vps:~# cat /etc/shorewall/interfaces
  21. #
  22. # Shorewall version 4.0 - Sample Interfaces File for one-interface configuration.
  23. # Copyright (C) 2006-2014 by the Shorewall Team
  24. #
  25. # This library is free software; you can redistribute it and/or
  26. # modify it under the terms of the GNU Lesser General Public
  27. # License as published by the Free Software Foundation; either
  28. # version 2.1 of the License, or (at your option) any later version.
  29. #
  30. # See the file README.txt for further details.
  31. #------------------------------------------------------------------------------
  32. # For information about entries in this file, type "man shorewall-interfaces"
  33. ###############################################################################
  34. ?FORMAT 2
  35. ###############################################################################
  36. #ZONE   INTERFACE       OPTIONS
  37. net     eth0            dhcp,tcpflags,logmartians,nosmurfs,sourceroute=0
  38. vpn     tun0            routefilter,dhcp,tcpflags,logmartians,nosmurfs
  39. root@hubot-vps:~# cat /etc/shorewall/zones
  40. #
  41. # Shorewall version 4.0 - Sample Zones File for one-interface configuration.
  42. # Copyright (C) 2006-2014 by the Shorewall Team
  43. #
  44. # This library is free software; you can redistribute it and/or
  45. # modify it under the terms of the GNU Lesser General Public
  46. # License as published by the Free Software Foundation; either
  47. # version 2.1 of the License, or (at your option) any later version.
  48. #
  49. # See the file README.txt for further details.
  50. #-----------------------------------------------------------------------------
  51. # For information about entries in this file, type "man shorewall-zones"
  52. ###############################################################################
  53. #ZONE   TYPE    OPTIONS                 IN                      OUT
  54. #                                       OPTIONS                 OPTIONS
  55. fw      firewall
  56. net     ipv4
  57. vpn     ipv4
  58. root@hubot-vps:~# cat /etc/shorewall/hosts
  59. #ZONE           HOSTS                                   OPTIONS
  60. vpn             eth0:10.0.0.0/8,95.155.90.197           ipsec
  61. root@hubot-vps:~# cat /etc/shorewall/policy
  62. #
  63. # Shorewall version 4.0 - Sample Policy File for one-interface configuration.
  64. # Copyright (C) 2006-2014 by the Shorewall Team
  65. #
  66. # This library is free software; you can redistribute it and/or
  67. # modify it under the terms of the GNU Lesser General Public
  68. # License as published by the Free Software Foundation; either
  69. # version 2.1 of the License, or (at your option) any later version.
  70. #
  71. # See the file README.txt for further details.
  72. #-----------------------------------------------------------------------------
  73. # For information about entries in this file, type "man shorewall-policy"
  74. ###############################################################################
  75. #SOURCE         DEST            POLICY          LOG LEVEL       LIMIT:BURST
  76. $FW             net             ACCEPT
  77. $FW             vpn             ACCEPT
  78. vpn             $FW             ACCEPT          info
  79. net             all             DROP            info
  80. # The FOLLOWING POLICY MUST BE LAST
  81. all             all             REJECT          info
  82. root@hubot-vps:~# cat /etc/shorewall/rules
  83. #
  84. # Shorewall version 4.0 - Sample Rules File for one-interface configuration.
  85. # Copyright (C) 2006-2014 by the Shorewall Team
  86. #
  87. # This library is free software; you can redistribute it and/or
  88. # modify it under the terms of the GNU Lesser General Public
  89. # License as published by the Free Software Foundation; either
  90. # version 2.1 of the License, or (at your option) any later version.
  91. #
  92. # See the file README.txt for further details.
  93. #------------------------------------------------------------------------------------------------------------
  94. # For information on entries in this file, type "man shorewall-rules"
  95. ######################################################################################################################################################################################################
  96. #ACTION         SOURCE          DEST            PROTO   DEST    SOURCE          ORIGINAL        RATE            USER/   MARK    CONNLIMIT       TIME            HEADERSSWITCH           HELPER
  97. #                                                       PORT    PORT(S)         DEST            LIMIT           GROUP
  98. ?SECTION ALL
  99. Ping(ACCEPT)    net             all             { RATE=d:ping:2/sec:10 }
  100. ?SECTION ESTABLISHED
  101. ?SECTION RELATED
  102. ?SECTION INVALID
  103. ?SECTION UNTRACKED
  104. ?SECTION NEW
  105.  
  106. # Drop packets in the INVALID state
  107.  
  108. Invalid(DROP)  net              $FW             tcp
  109.  
  110. # Drop Ping from the "bad" net zone.. and prevent your log from being flooded..
  111.  
  112. Ping(DROP)      net             $FW
  113.  
  114. # Permit all ICMP traffic FROM the firewall TO the net zone
  115.  
  116. ACCEPT          $FW             net             icmp
  117.  
  118. # DNS (accept DNS queries)
  119.  
  120. DNS(ACCEPT)     all             $FW
  121.  
  122. # SSH (we allow login SSH)
  123.  
  124. SSH(ACCEPT)     all             $FW
  125.  
  126. # FTP (we allow login FTP)
  127.  
  128. FTP(DROP)       all             $FW     
  129.  
  130. # WEB (the whole world can visit our web server on ports 80 and 443)
  131.  
  132. HTTP(ACCEPT)    all             $FW
  133. HTTPS(ACCEPT)   all             $FW
  134.  
  135. # Mail (we accept mail)
  136.  
  137. SMTP/ACCEPT     all             $FW
  138. SMTPS/ACCEPT    all             $FW
  139. POP3/ACCEPT     all             $FW
  140. POP3S/ACCEPT    all             $FW
  141. IMAP/ACCEPT     all             $FW
  142. IMAPS/ACCEPT    all             $FW
  143.  
  144. # ZNC (IRC bouncer)
  145.  
  146. ACCEPT          all             $FW             tcp             1025
  147.  
  148. # Glassfish admin console
  149.  
  150. DROP            all             $FW             tcp             4848
  151.  
  152. # Glassfish server port (8080)
  153.  
  154. ACCEPT          all             $FW             tcp             8080
  155.  
  156. # JEE (development container of JEE)
  157.  
  158. DROP            all             $FW             tcp             24848
  159. DROP          all             $FW             tcp             28080
  160. DROP          all             $FW             tcp             28181
  161. DROP          all             $FW             tcp             23700
  162. DROP          all             $FW             tcp             23820
  163. DROP          all             $FW             tcp             23920
  164. DROP          all             $FW             tcp             29009
  165. DROP          all             $FW             tcp             27676
  166. DROP          all             $FW             tcp             28686
  167. DROP          all             $FW             tcp             26666
  168.  
  169. # Accept traffic from VPN
  170.  
  171. ACCEPT:info     net             $FW             udp             7480
  172. ACCEPT:info     vpn             $FW
  173. ACCEPT:info     $FW             vpn

Źródło:

Ostatnie wpisy

Linki

Funkcje