This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Blocking a hacker

Hi,
I've just discovered for about the past 4 hours I've had someone trying to access my exchange server. I thought I could put their IP address in as the source on the firewall, service as any, and destination as either any or internal network and then drop the packets.. but it doesn't seem to work...

Can anyone help? - I want to stop this person just incase they happen to gain access...


This thread was automatically locked due to age.
Parents
  • falling back on the "rulz":
    In general, a packet arriving at an interface is handled only by one of the following, in order: DNATs first, then VPNs and Proxies and, finally, manual Routes and Firewall rules. (see attachment below)

    so I guess you either have a DNAT or manual route to the exchange server which matches first, so it doesn't even hit the firewall

    note: (this is how I understand it, can someone confirm?)
  • Yeah most likely you have a DNAT set to forward traffic from your external interface to your internal IP.

    You have some options, 
    you could create a White List of IPs that should be accessing your server. Only forward trusted IPs to your server. This Does not help if your server is open to the public.

    You could place a new NAT rule above your current one to blackhole the attacker sending packets to a junk IP. I have not had much luck with this approach.

    Or you could create your own custom firewall rules.
    1) First I would create a new firewall rule that duplicates that NAT rule to allow traffic, turn on Logging
    2) Then turn off Automatic firewall rules on your original NAT, traffic should now depend your new firewall rule you to access the server.
    3) Confirm people can still reach your server, by looking at the logs.
    4) Create a new firewall rule that blocks the attackers IP, MAKE SURE you place it above the firewall rule you made in step 1. Turn on Logging
    5) Confirm again by looking at the live logs. You should see all traffic green other then your attacker who should be getting blocked.

    The blocking firewall rule must be above your allow rule (Have a lower number). Firewalls start at rule #1 then look at #2 and goes down the list of rules until it hits a rule that applies, once it finds a matching rule, it stops looking. If your allow rule is first it will never see the blocking rule.
Reply
  • Yeah most likely you have a DNAT set to forward traffic from your external interface to your internal IP.

    You have some options, 
    you could create a White List of IPs that should be accessing your server. Only forward trusted IPs to your server. This Does not help if your server is open to the public.

    You could place a new NAT rule above your current one to blackhole the attacker sending packets to a junk IP. I have not had much luck with this approach.

    Or you could create your own custom firewall rules.
    1) First I would create a new firewall rule that duplicates that NAT rule to allow traffic, turn on Logging
    2) Then turn off Automatic firewall rules on your original NAT, traffic should now depend your new firewall rule you to access the server.
    3) Confirm people can still reach your server, by looking at the logs.
    4) Create a new firewall rule that blocks the attackers IP, MAKE SURE you place it above the firewall rule you made in step 1. Turn on Logging
    5) Confirm again by looking at the live logs. You should see all traffic green other then your attacker who should be getting blocked.

    The blocking firewall rule must be above your allow rule (Have a lower number). Firewalls start at rule #1 then look at #2 and goes down the list of rules until it hits a rule that applies, once it finds a matching rule, it stops looking. If your allow rule is first it will never see the blocking rule.
Children
No Data