{"id":346,"date":"2021-05-11T11:29:34","date_gmt":"2021-05-11T14:29:34","guid":{"rendered":"https:\/\/blog.galsoft.duckdns.org\/?p=346"},"modified":"2021-05-11T11:29:39","modified_gmt":"2021-05-11T14:29:39","slug":"2-comandos-para-administradores-de-redes","status":"publish","type":"post","link":"https:\/\/blog.galsoft.com.ar\/?p=346","title":{"rendered":"2 comandos para administradores de redes"},"content":{"rendered":"<p><strong>UFW es un frontend para gestionar las reglas de firewall en Arch Linux, Debian y Ubuntu. Se utiliza a trav\u00e9s de la l\u00ednea de comandos y su raz\u00f3n de ser es la de simplificar la configuraci\u00f3n del firewall de Linux (como su nombre indica).<\/strong><\/p>\n<p>sudo ufw status Verificar estado de UFW y ver reglas <\/p>\n<p>sudo ufw enable \/ sudo ufw disable Activar o desactivar UFW <\/p>\n<p>sudo ufw allow ssh = sudo ufw allow 22 Permitir SSH <\/p>\n<p>sudo ufw deny ssh Bloquear SSH <\/p>\n<p>sudo ufw allow 9995\/udp Permitir puerto 9995 UDP <\/p>\n<p>sudo ufw allow from <a rel=\"noreferrer noopener\" href=\"https:\/\/www.youtube.com\/redirect?event=comments&amp;redir_token=QUFFLUhqbnpybm9jTDBPanFPMlBVVmEwQUM2NlhjQnNrQXxBQ3Jtc0treEhsTFhfYUxSTDBYME4zSUJtLTJDWWhpS0NmMXhRUC16ald2Y0E1cDlpUEJhMTdIVmdkSVJhMnZpU1VjQ0k2VlZJQVVhclM4UkdodWRMVXJqSE9YQ0E0dVR6UVpiR1F0T0QxQjhnZEdFWnM4OFF0Zw&amp;q=http%3A%2F%2F192.168.178.254%2F&amp;stzid=UgyZqTUAMzYeuGudgBF4AaABAg\" target=\"_blank\">192.168.178.254<\/a> Permitir conexiones desde <a rel=\"noreferrer noopener\" href=\"https:\/\/www.youtube.com\/redirect?event=comments&amp;redir_token=QUFFLUhqbVFMS0ZzMGhMOEZSemdleWNUa2JFUEdnUFhlQXxBQ3Jtc0ttMjVwQ2FqMXlMWVJJbnNPWWlBa0NFSzZfbEdpeVE3c0RDY3VWOEJxN3Rzb2RjTlZJcUdrSzVUU3RNdGQ2S0pNMGJYcm5WN2l6d1JhR3FycmxVdWxRdkxnOE1TTWtKLWxmQmhteXNra3YwMTVRTURaTQ&amp;q=http%3A%2F%2F192.168.178.254%2F&amp;stzid=UgyZqTUAMzYeuGudgBF4AaABAg\" target=\"_blank\">192.168.178.254<\/a> <\/p>\n<p>sudo ufw allow from <a rel=\"noreferrer noopener\" href=\"https:\/\/www.youtube.com\/redirect?event=comments&amp;redir_token=QUFFLUhqa0hZLTdvSmE5bndYelhHZnc4ZmJmdWxwbUpnZ3xBQ3Jtc0tuZWVhOW11dkpVMFVsOEdkdUFnTk1KWXdqZlE0RW9PY29rcjFQOFFLdHFFeTlYN2V4c3JEWlZTN3dGT1lGVVNCQ1JHZTlfMjNSZnlVbUg3QkwwNkNhMW9IYTR0akZTQlh1MjN6MTFfQ2V5c3BuLTJDcw&amp;q=http%3A%2F%2F192.168.178.0%2F24&amp;stzid=UgyZqTUAMzYeuGudgBF4AaABAg\" target=\"_blank\">192.168.178.0\/24<\/a> Permitir conexiones desde <a rel=\"noreferrer noopener\" href=\"https:\/\/www.youtube.com\/redirect?event=comments&amp;redir_token=QUFFLUhqbnJWSF9TZWkwclRpWUZ0RXNoNmZKdXE3dW5sQXxBQ3Jtc0tsZXBLbEEweFdvM09BVC1XME5lWUdEMUZ0SGRXcGJMTXNERHlrSzNsbjd2Mno3S2pNdm9lVVhqY3h3RmtRekZjY2NwTHhBYl9fbVA5aGM1VUtzdXJoT1dFVG9kUEU0UE1GYkRtbHc3V2xjUDllTzB3Yw&amp;q=http%3A%2F%2F192.168.178.0%2F24&amp;stzid=UgyZqTUAMzYeuGudgBF4AaABAg\" target=\"_blank\">192.168.178.0\/24<\/a> <\/p>\n<p>sudo ufw allow from any to <a rel=\"noreferrer noopener\" href=\"https:\/\/www.youtube.com\/redirect?event=comments&amp;redir_token=QUFFLUhqbmh1Q1cwcFZxS2diM09ySWE5Zm4xX3BFdW1WUXxBQ3Jtc0tsUlVvT1hsZWJMTEp1ZDJ0dnBqc1RNZ3c5QjJKb1NXQlUzR2IxdXI2TVJWR1ZZZHp1MXg1d0JKTFM5aUNXZXlPSUtKNTlGb2RFMmFmb2U4aWdBY1p4aG1UMTZOZzhVSHhXZzFvYlVjMWdJcDhHRVFlTQ&amp;q=http%3A%2F%2F192.168.178.254%2F&amp;stzid=UgyZqTUAMzYeuGudgBF4AaABAg\" target=\"_blank\">192.168.178.254<\/a> port 9995 proto udp Permitir conexiones hacia <a rel=\"noreferrer noopener\" href=\"https:\/\/www.youtube.com\/redirect?event=comments&amp;redir_token=QUFFLUhqbktyU01qU1E3NEtUOHpJR3dhMEM0MDJTancxQXxBQ3Jtc0tuNkMzamx3THR3NnFxcnk1SjRhd2VRR2hJckM0UmZUbndKeWFKS3ByOXVKWEVCYkpRaV84QWNXeU1OcWd4M0I2UkUyWGxzcVRWcHBXQVBCLWlGZXZGUjhHM1RGcEh5YjBXMFhUbl96cUxKX2pqM1RmZw&amp;q=http%3A%2F%2F192.168.178.254%2F&amp;stzid=UgyZqTUAMzYeuGudgBF4AaABAg\" target=\"_blank\">192.168.178.254<\/a> puerto 9995 UDP <\/p>\n<p>sudo ufw delete Borrar una regla sudo ufw logging on Activar el log<\/p>\n<p><\/p>\n<p><strong>Tcpdump es un analizador de paquetes que se ejecuta desde una linea de comandos<\/strong><\/p>\n<p>sudo tcpdump \u2013nn \u2013i ens192 No resolver direcciones IP ni puertos. Capturar tr\u00e1fico que pasa por la interfaz ens192 <\/p>\n<p>sudo tcpdump -nn -vv -i ens192 Verbose, muestra m\u00e1s informaci\u00f3n <\/p>\n<p>sudo tcpdump src <a rel=\"noreferrer noopener\" href=\"https:\/\/www.youtube.com\/redirect?event=comments&amp;redir_token=QUFFLUhqbDFCeEdmakE5UnpwZ21qRFloMndKbkMwNWpId3xBQ3Jtc0tsSzlHVEEtU0xjOEZHV0txdjJKNS1KSUVSRVpHSXZYUzFoVXRQZFliTUtoejlCdlI0OEE2ZWZyZVN5YXk2YmtqNEFMWjM2WktJTnhaLUMzX3ZvQ2thQ1lUYllsOGZuQXNKakczWkYxWFdEdk8xWG91MA&amp;q=http%3A%2F%2F10.50.79.2%2F&amp;stzid=UgyZqTUAMzYeuGudgBF4AaABAg\" target=\"_blank\">10.50.79.2<\/a> Capturar paquetes con IP de origen <a rel=\"noreferrer noopener\" href=\"https:\/\/www.youtube.com\/redirect?event=comments&amp;redir_token=QUFFLUhqbEdXdUJZWUJZLWZ1UjRCbmtYR0Q5OFkxdlg4UXxBQ3Jtc0ttcmxrcTV4RDBlWDByc3NoWDJVeFlmd21tYk43R0FVSGc4ekE2SmZvOEgtRjJfRm5aclVXSFNRU0o4REhlSUdPVExkS3dQa3Z1eV9kcWZiRVppZTdfb1o2X2E3LTRrdEFfSl80ZlMtVDFESmhFMFE0TQ&amp;q=http%3A%2F%2F10.50.79.2%2F&amp;stzid=UgyZqTUAMzYeuGudgBF4AaABAg\" target=\"_blank\">10.50.79.2<\/a> <\/p>\n<p>sudo tcpdump dst <a rel=\"noreferrer noopener\" href=\"https:\/\/www.youtube.com\/redirect?event=comments&amp;redir_token=QUFFLUhqbE9GMkoyRENMUWcxaHNrUTBXWnlTbFRXS2p6QXxBQ3Jtc0trVlVaWW9kUVlzTG94UmUzSXZkSXowV1RMWVNFdTVzZ3VKUHlwQjRYMlo0NTZTZnQ4LTloNTk1V21zWFY0UlBpZWI4b0ZiTHRMa01rUUQ5TVRURmdYNWk2RmlSUnd3dDhPaTF6VGdEMkdnVXNGREtnQQ&amp;q=http%3A%2F%2F10.50.79.2%2F&amp;stzid=UgyZqTUAMzYeuGudgBF4AaABAg\" target=\"_blank\">10.50.79.2<\/a> Capturar paquetes con IP de destino <a rel=\"noreferrer noopener\" href=\"https:\/\/www.youtube.com\/redirect?event=comments&amp;redir_token=QUFFLUhqbV9ITWJ3Zy1ockxEN0E1NzItR3Zrcm0zd2pad3xBQ3Jtc0tuNmVlQWhhbGU2OVJUMlU2NkxZaHJ4MWM1OGlJUUw5dVc3andINFpxbTRleDMwemZZbmpJVW5CTlpoRnNuSGZ3OTgwVmgwVmVhSEVwcTB0a3M5djBZWmREbzhSaEY5cTRlTUJveGtqcTFvWWhFUHROWQ&amp;q=http%3A%2F%2F10.50.79.2%2F&amp;stzid=UgyZqTUAMzYeuGudgBF4AaABAg\" target=\"_blank\">10.50.79.2<\/a> <\/p>\n<p>sudo tcpdump host <a rel=\"noreferrer noopener\" href=\"https:\/\/www.youtube.com\/redirect?event=comments&amp;redir_token=QUFFLUhqa3lYOVoycTRwWWlxVHdkQnRjME5VMTRaX1BNd3xBQ3Jtc0tsZWtrUmxyaGFKaGlTbkFlVFYtSWxaNXg3UUdnS08wNUxMcFRBZGdLS2JINi0xbGdfOXVmMGJueU9SdE02MTZqajlkOHRBVWM1WlNwOWZhYTNTWm01MHQ3b1VsMVMxenpFcWdqMUFRUzZLLWV2RkZRRQ&amp;q=http%3A%2F%2F10.50.79.2%2F&amp;stzid=UgyZqTUAMzYeuGudgBF4AaABAg\" target=\"_blank\">10.50.79.2<\/a> Capturar paquetes con IP de origen o destino <a rel=\"noreferrer noopener\" href=\"https:\/\/www.youtube.com\/redirect?event=comments&amp;redir_token=QUFFLUhqbVl2bTB2MTJEZDJzRkgwODBtblRLMDdLc0pWZ3xBQ3Jtc0trczJ6aE96aGJ3cm5ieXE0STBzakNyZWl5a1BNd2d2b2VlSnBoSk5yTzdhWGVLQTYtZnpTcC02NTZHUkUyOTdHWG41Zl9DbjRBR0VjWXZYV215NkxfcFF4MEM0YUhUMXVjQS00bzFaY3Fpb2hKU3R6Yw&amp;q=http%3A%2F%2F10.50.79.2%2F&amp;stzid=UgyZqTUAMzYeuGudgBF4AaABAg\" target=\"_blank\">10.50.79.2<\/a> <\/p>\n<p>sudo tcpdump net <a rel=\"noreferrer noopener\" href=\"https:\/\/www.youtube.com\/redirect?event=comments&amp;redir_token=QUFFLUhqbG9ONEJTcE04c2c5WXVRdFJxc25Ga1F2NVVJUXxBQ3Jtc0tuelBVamxBUXY0V1VMTmREMlBFSXA5cFNVOFo5em1WMjlGeFhVSElzN3pPVENBMnVJYjJ4UDVab2xiVXVGd3RKaGlpd09ZUDUyYTFESXJwT3BQTG1EbGJHMmtUUklWRzVNWFgyYVdicU1wMm1hZEVzOA&amp;q=http%3A%2F%2F10.50.79.0%2F24&amp;stzid=UgyZqTUAMzYeuGudgBF4AaABAg\" target=\"_blank\">10.50.79.0\/24<\/a> Capturar paquetes con red de origen o destino <a rel=\"noreferrer noopener\" href=\"https:\/\/www.youtube.com\/redirect?event=comments&amp;redir_token=QUFFLUhqbEQ1RkhzZTA3NTREWFlXUTFzcFBDNEQ3MjNkUXxBQ3Jtc0tsNDhXZHVZMjVIQk9mdWx1Rzh0SWcwRVU3ZDlaVm1MT0NXYzRBRGxBbVpmSzgtRWRCLXlDb3dfWUlISXhCdTVJN2VkdWxVSUpYRFRPOUhMME80a0xBX3NELXR0Y1R4MXRQQjlHNEcxVFFlRHFub2M1bw&amp;q=http%3A%2F%2F10.50.79.0%2F24&amp;stzid=UgyZqTUAMzYeuGudgBF4AaABAg\" target=\"_blank\">10.50.79.0\/24<\/a> <\/p>\n<p>sudo tcpdump port 9995 Capturar paquetes con puerto de origen o destino 9995 <\/p>\n<p>sudo tcpdump -s0 -i ens192 \u2013w captura.pcap Guardar la captura en un archivo externo para abrirla m\u00e1s tarde con un analizador de paquetes (Por ejemplo: Wireshark)<\/p>","protected":false},"excerpt":{"rendered":"<p>UFW es un frontend para gestionar las reglas de firewall en Arch Linux, Debian y Ubuntu. Se utiliza a trav\u00e9s de la l\u00ednea de comandos y su raz\u00f3n de ser es la de simplificar la configuraci\u00f3n del firewall de Linux (como su nombre indica). sudo ufw status Verificar estado de UFW y ver reglas sudo [&hellip;]<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ocean_post_layout":"","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"0","ocean_second_sidebar":"0","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"","ocean_center_header_left_menu":"0","ocean_custom_header_template":"0","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"0","ocean_menu_typo_font_family":"0","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"default","ocean_disable_heading":"default","ocean_post_title":"","ocean_post_subheading":"","ocean_post_title_style":"","ocean_post_title_background_color":"","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"0","ocean_post_oembed":"","ocean_post_self_hosted_media":"","ocean_post_video_embed":"","ocean_link_format":"","ocean_link_format_target":"self","ocean_quote_format":"","ocean_quote_format_link":"post","ocean_gallery_link_images":"off","ocean_gallery_id":[],"footnotes":""},"categories":[1],"tags":[],"class_list":["post-346","post","type-post","status-publish","format-standard","hentry","category-linux","entry"],"_links":{"self":[{"href":"https:\/\/blog.galsoft.com.ar\/index.php?rest_route=\/wp\/v2\/posts\/346","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.galsoft.com.ar\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.galsoft.com.ar\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.galsoft.com.ar\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.galsoft.com.ar\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=346"}],"version-history":[{"count":1,"href":"https:\/\/blog.galsoft.com.ar\/index.php?rest_route=\/wp\/v2\/posts\/346\/revisions"}],"predecessor-version":[{"id":347,"href":"https:\/\/blog.galsoft.com.ar\/index.php?rest_route=\/wp\/v2\/posts\/346\/revisions\/347"}],"wp:attachment":[{"href":"https:\/\/blog.galsoft.com.ar\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=346"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.galsoft.com.ar\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=346"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.galsoft.com.ar\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=346"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}