Soluții

Create an inbound ICMP rule with Firewall – Windows

This type of rule allows ICMP requests and responses to be received by devices on the network. To create an inbound ICMP rule:

  1. Open the Windows Firewall with Advanced Security console
  2. In the navigation pane, select Inbound Rules
  3. Select Action, and then select New rule
  4. On the Rule Type page of the New Inbound Rule Wizard, select Custom, and then select Next
  5. On the Program page, select All programs, and then select Next
  6. On the Protocol and Ports page, select ICMPv4 or ICMPv6 from the Protocol type list. If you use both IPv4 and IPv6 on your network, you must create a separate ICMP rule for each
  7. Select Customize
  8. In the Customize ICMP Settings dialog box, do one of the following:
    • To allow all ICMP network traffic, select All ICMP types, and then select OK
    • To select one of the predefined ICMP types, select Specific ICMP types, and then select each type in the list that you want to allow. Select OK
    • To select an ICMP type that does not appear in the list, select Specific ICMP types, select the Type number from the list, select the Code number from the list, select Add, and then select the newly created entry from the list. Select OK
  9. Select Next
  10. On the Scope page, you can specify that the rule applies only to network traffic to or from the IP addresses entered on this page. Configure as appropriate for your design, and then select Next
  11. On the Action page, select Allow the connection, and then select Next
  12. On the Profile page, select the network location types to which this rule applies, and then select Next
  13. On the Name page, type a name and description for your rule, and then select Finish.
[mai mult...]

Create inbound & outbound port rule in Firewall – Windows

This type of rule allows any program that listens on a specified TCP or UDP port to receive network traffic sent to that port. To create an inbound port rule:

  1. Open the Windows Firewall with Advanced Security console
  2. In the navigation pane, select Inbound Rules
  3. Select Action, and then select New rule
  4. On the Rule Type page of the New Inbound Rule Wizard, select Custom, and then select Next

Although you can create rules by selecting Program or Port, those choices limit the number of pages presented by the wizard. If you select Custom, you see all of the pages, and have the most flexibility in creating your rules.

  • On the Program page, select All programs, and then select Next

This type of rule is often combined with a program or service rule. If you combine the rule types, you get a firewall rule that limits traffic to a specified port and allows the traffic only when the specified program is running. The specified program cannot receive network traffic on other ports, and other programs cannot receive network traffic on the specified port.

  1. On the Protocol and Ports page, select the protocol type that you want to allow. To restrict the rule to a specified port number, you must select either TCP or UDP. Because this is an incoming rule, you typically configure only the local port number If you select another protocol, then only packets whose protocol field in the IP header match this rule are permitted through the firewall.
    To select a protocol by its number, select Custom from the list, and then type the number in the Protocol number box.
    When you have configured the protocols and ports, select Next.
  2. On the Scope page, you can specify that the rule applies only to network traffic to or from the IP addresses entered on this page. Configure as appropriate for your design, and then select Next
  3. On the Action page, select Allow the connection, and then select Next
  4. On the Profile page, select the network location types to which this rule applies, and then select Next

If this GPO is targeted at server computers running Windows Server 2008 that never move, consider modifying the rules to apply to all network location type profiles. This prevents an unexpected change in the applied rules if the network location type changes due to the installation of a new network card or the disconnection of an existing network card’s cable. A disconnected network card is automatically assigned to the Public network location type.

  1. On the Name page, type a name and description for your rule, and then select Finish

Create an outbound port rule

By default, Windows Firewall allows all outbound network traffic, unless it matches a rule that prohibits the traffic. This type of rule blocks any outbound network traffic that matches the specified TCP or UDP port numbers. To create an outbound port rule:

  1. Open the Windows Firewall with Advanced Security console
  2. In the navigation pane, select Outbound Rules
  3. Select Action, and then select New rule
  4. On the Rule Type page of the New Outbound Rule wizard, select Custom, and then select Next

Although you can create rules by selecting Program or Port, those choices limit the number of pages presented by the wizard. If you select Custom, you see all of the pages, and have the most flexibility in creating your rules.

  1. On the Program page, select All programs, and then select Next
  2. On the Protocol and Ports page, select the protocol type that you want to block. To restrict the rule to a specified port number, you must select either TCP or UDP. Because this rule is an outbound rule, you typically configure only the remote port number If you select another protocol, then only packets whose protocol field in the IP header matches this rule are blocked by Windows Defender Firewall. Network traffic for protocols is allowed as long as other rules that match don’t block it. To select a protocol by its number, select Custom from the list, and then type the number in the Protocol number box. When you’ve configured the protocols and ports, select Next
  3. On the Scope page, you can specify that the rule applies only to network traffic to or from the IP addresses entered on this page. Configure as appropriate for your design, and then select Next
  4. On the Action page, select Block the connection, and then select Next
  5. On the Profile page, select the network location types to which this rule applies, and then select Next
  6. On the Name page, type a name and description for your rule, and then select Finish.
[mai mult...]

4 Ways to use the Linux alias Command

Consider the following command that prints the top ten directories that take up the most disk space:

# du -h /path/to/directory | sort -hr | head -n 10

This is a frequent check, and you can imagine the effort required to type this command in the terminal and scripts. Repetitively typing or copying the same command lowers productivity and introduces a hassle you can easily avoid with the alias command.

By making aliases for the commands you use frequently, you can save yourself a couple of hours every month. Similar to personalized shortcuts, aliases refer to a command (or group of commands) that can be used with or without personalized parameters.

You are likely utilizing aliases on your Linux system without being aware of the fact.

This article will introduce you to the alias command. We’ll show you how to create command aliases with the Linux alias command. Next, we’ll go into the details of making command aliases permanent on your system. Finally, we’ll show you how to remove command aliases.

But first, let’s start with a short introduction to the idea of command aliases in Linux.

[mai mult...]

How to create Disk partitions using parted and fdisk

Creating or resizing disk partitions is an important activity when installing any Linux distribution. Partitioning your system’s disk allows you to divide it into separate sections, each functioning as its own independent storage unit.

It is also a crucial system administration task where the admin optimizes the usage of storage space by creating partitions that the system OS, applications, and users can use without worrying about running out of storage or unused disk space. In a multi-OS environment, you need disk partitions to allocate space to each OS on the disk. In this case, disk partitioning is an essential activity for ensuring system performance and supporting user applications.

[mai mult...]