LOG firewall and haproxy
-
Hello,
pfsens 2.4.4-RELEASE-p3
haproxy net 0.59_21 Package Dependencies: haproxy17-1.7.12Where are the logs the haproxy and firewall?
I would like to block external IPs that generate a lot of traffic
thanks
-
@pino121 the firewall log would only show stuff that was allowed by your rules, if you enable logging on the rules that you set to allow traffic to your haproxy on the wan. You would then see IPs that hit your rule that allow access to whatever port(s) your haproxy is listening on.
Normally allow rules are not logged, only the default deny is logged by default.
If you want to see logs from haproxy, you have to set haproxy to log - by default it does not. And even if you set it to log, in the haproxy settings. Those would not be viewable in the normal log gui of pfsense.
btw, your pfsense is out of date and actually no longer listed as supported. I would highly suggest you update to current if at all possible. The only still supported version of 2.4.x is the 2.4.5p1 version. Current version of CE is 2.5.2, while + (if your on netgate hardware) is 21.05.2
This would also allow you to update your haproxy package, dev version which is really the recommended version to use is currently at 0.62-4, with haproxy-2.2.14
-
@johnpoz said in LOG firewall and haproxy:
@pino121 the firewall log would only show stuff that was allowed by your rules, if you enable logging on the rules that you set to allow traffic to your haproxy on the wan. You would then see IPs that hit your rule that allow access to whatever port(s) your haproxy is listening on.
Normally allow rules are not logged, only the default deny is logged by default.
If you want to see logs from haproxy, you have to set haproxy to log - by default it does not. And even if you set it to log, in the haproxy settings. Those would not be viewable in the normal log gui of pfsense.
btw, your pfsense is out of date and actually no longer listed as supported. I would highly suggest you update to current if at all possible. The only still supported version of 2.4.x is the 2.4.5p1 version. Current version of CE is 2.5.2, while + (if your on netgate hardware) is 21.05.2
This would also allow you to update your haproxy package, dev version which is really the recommended version to use is currently at 0.62-4, with haproxy-2.2.14Hello johnpoz,
i have enable the log on firewall rules for http and https traffic.
I have enable the local log for haproxy, Services -> HAProxy -> Settings, "Logging" section.
In "Remote syslog host" put /var/run/log.Please help me,
i would like to check the external and internal ip that make more traffic from the firewall or haproxy logs,Thank you
-
@pino121 well now you can see in your firewall logs which IP hit your allow rules.
here is my phone from cell connection hitting my wan IP on 443
And you can look in your haproxy log for client IPs.
cat /var/log/haproxy.log
now the way I do my haproxy, I only see localhost, since I do a port share.. Let me change my rules so it shows public IP.
But I clearly see connections being logged
edit: Here I changed up my forwards so haproxy would see the external IP.
That is my phone hitting website I use via haproxy..
edit2: If your curious what IPs are using most traffic - you could look in your state table.
-
@johnpoz said in LOG firewall and haproxy:
edit2: If your curious what IPs are using most traffic - you could look in your state table.
thanks for your kind reply,
I did not understand this:
edit2: If your curious what IPs are using most traffic - you could look in your state table.
Could you please tell me where to look? -