Author Topic: Varnish problem with woocommerce  (Read 1711 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Varnish problem with woocommerce
« on: March 01, 2023, 02:02:07 PM »
I'm configuring Verniz to use woocommerce and I made some changes to the "default.vcl" file to separate the cache for mobile and desktop because my site appears different on mobile, this is the code:

Code: [Select]
vcl 4.0;
backend default { .host = "144.126.137.13"; .port = "8181";}
include "/etc/varnish/conf.d/vhosts.conf";
## ## Not complete default.vcl code

# Routine to try and identify device
sub identify_device {
# Default to thinking it's desktop
set req.http.X-UA-Device = "desktop";

if (req.http.User-Agent ~ "iPad" ) {
# It says its a iPad - so let's give them the tablet-site
set req.http.X-UA-Device = "tablet";
}

else if (req.http.User-Agent ~ "iP(hone|od)" || req.http.User-Agent ~ "Android" || req.http.User-Agent ~ "Windows Phone" || req.http.User-Agent ~ "[ (]BlackBerry;") {
                # It says its a iPhone, iPod, Android  or BlackBerry - so let's give them the touch-site..
                set req.http.X-UA-Device = "smartphone";
    }

else if (req.http.User-Agent ~ "Kindle" || req.http.User-Agent ~ "^nook browser") {
set req.http.X-UA-Device = "ereader";
}

else if (req.http.User-Agent ~ "SymbianOS" || req.http.User-Agent ~ "^BlackBerry" || req.http.User-Agent ~ "^SonyEricsson" || req.http.User-Agent ~ "^Nokia" || req.http.User-Agent ~ "^SAMSUNG" || req.http.User-Agent ~ "^LG" || req.http.User-Agent ~ "IEMobile" || req.http.User-Agent ~ "Windows CE") {
# Some other sort of mobile
set req.http.X-UA-Device = "mobile-other";

}

sub vcl_recv {
  call identify_device;
}

sub vcl_hash {
    hash_data(req.url);
    if (req.http.X-UA-Device){
      # Add device info with uniqueID cache
      hash_data(req.http.X-UA-Device);
    }
    if (req.http.host) {
        hash_data(req.http.host);
    } else {
        hash_data(server.ip);
    }
    return (lookup);
}

# Unset Cookies except for WordPress admin and WooCommerce pages
if (!(req.url ~ "(wp-login|wp-admin|carrinho|cart|add-to-cart|minha-conta/*|wc-api*|checkout|escritorio-virtual|addons|logout|lost-password|produto/*)")) {
unset req.http.cookie;
}
# Pass through the WooCommerce dynamic pages
if (req.url ~ "^/(carrinho|cart|add-to-cart|minha-conta/*|escritorio-virtual/*|checkout|wc-api/*|addons|logout|lost-password|product/*)") {
return (pass);
}
# Pass through the WooCommerce add to cart
if (req.url ~ "\?add-to-cart=" ) {
return (pass);
}
# Pass through the WooCommerce API
if (req.url ~ "\?wc-api=" ) {
return (pass);
}
# Block access to php admin pages via website
if (req.url ~ "^/phpmyadmin/.*$" || req.url ~ "^/phppgadmin/.*$" || req.url ~ "^/server-status.*$") {
error 403 "For security reasons, this URL is only accesible using localhost (127.0.0.1) as the hostname";
}

But now the server is not booting and I can't solve it, can someone help me? I am posting the error log below:

Code: [Select]
● varnish.service - Varnish Cache, a high-performance HTTP accelerator
   Loaded: loaded (/usr/lib/systemd/system/varnish.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Wed 2023-03-01 07:55:27 CST; 5min ago
  Process: 4116 ExecStart=/usr/sbin/varnishd -P /var/run/varnish.pid -f $VARNISH_VCL_CONF -a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} -T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} -S $VARNISH_SECRET_FILE -s $VARNISH_STORAGE $DAEMON_OPTS (code=exited, status=255)
 Main PID: 30643 (code=exited, status=0/SUCCESS)

Mar 01 07:55:27 server.ayanlife.com varnishd[4116]: Found: 'if' at
Mar 01 07:55:27 server.ayanlife.com varnishd[4116]: ('/etc/varnish/default.vcl' Line 50 Pos 1)
Mar 01 07:55:27 server.ayanlife.com varnishd[4116]: if (!(req.url ~ "(wp-login|wp-admin|carrinho|cart|add-to-cart|minha-conta/*|wc-api*|checkout|escritorio-virtual|addons|logout|lost-password|produto/*)")) {
Mar 01 07:55:27 server.ayanlife.com varnishd[4116]: ##----------------------------------------------------------------------------------------------------------------------------------------------------------
Mar 01 07:55:27 server.ayanlife.com varnishd[4116]: Running VCC-compiler failed, exited with 2
Mar 01 07:55:27 server.ayanlife.com varnishd[4116]: VCL compilation failed
Mar 01 07:55:27 server.ayanlife.com systemd[1]: varnish.service: control process exited, code=exited status=255
Mar 01 07:55:27 server.ayanlife.com systemd[1]: Failed to start Varnish Cache, a high-performance HTTP accelerator.
Mar 01 07:55:27 server.ayanlife.com systemd[1]: Unit varnish.service entered failed state.
Mar 01 07:55:27 server.ayanlife.com systemd[1]: varnish.service failed.

I really need this help

Offline
*
Re: Varnish problem with woocommerce
« Reply #1 on: March 01, 2023, 02:06:00 PM »
I'm not understanding this firewall error, here is the bigger log

Code: [Select]
Mar 01 08:00:50 server.ayanlife.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d6:d9:08:00 SRC=151.80.239.126 DST=144.126.137.13 LEN=40 TOS=0x08 PREC=0x20 TTL=239 ID=24064 PROTO=TCP SPT=61000 DPT=62210 WINDOW=1024 RES=0x00 SYN URGP=0
Mar 01 08:00:53 server.ayanlife.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d6:d9:08:00 SRC=151.80.239.126 DST=144.126.137.13 LEN=40 TOS=0x08 PREC=0x20 TTL=239 ID=57749 PROTO=TCP SPT=61000 DPT=52415 WINDOW=1024 RES=0x00 SYN URGP=0
Mar 01 08:00:54 server.ayanlife.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d6:d9:08:00 SRC=151.80.239.126 DST=144.126.137.13 LEN=40 TOS=0x08 PREC=0x20 TTL=239 ID=1382 PROTO=TCP SPT=61000 DPT=23226 WINDOW=1024 RES=0x00 SYN URGP=0
Mar 01 08:00:56 server.ayanlife.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d6:d9:08:00 SRC=151.80.239.126 DST=144.126.137.13 LEN=40 TOS=0x08 PREC=0x20 TTL=239 ID=51067 PROTO=TCP SPT=61000 DPT=20142 WINDOW=1024 RES=0x00 SYN URGP=0
Mar 01 08:00:58 server.ayanlife.com postfix/smtpd[5022]: connect from unknown[46.148.40.183]
Mar 01 08:00:59 server.ayanlife.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d6:d9:08:00 SRC=151.80.239.126 DST=144.126.137.13 LEN=40 TOS=0x08 PREC=0x20 TTL=239 ID=40488 PROTO=TCP SPT=61000 DPT=34657 WINDOW=1024 RES=0x00 SYN URGP=0
Mar 01 08:00:59 server.ayanlife.com postfix/smtpd[5022]: Anonymous TLS connection established from unknown[46.148.40.183]: TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)
Mar 01 08:01:01 server.ayanlife.com systemd[1]: Created slice User Slice of root.
-- Subject: Unit user-0.slice has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit user-0.slice has finished starting up.
--
-- The start-up result is done.
Mar 01 08:01:01 server.ayanlife.com systemd[1]: Started Session 936 of user root.
-- Subject: Unit session-936.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-936.scope has finished starting up.
--
-- The start-up result is done.
Mar 01 08:01:01 server.ayanlife.com CROND[5051]: (root) CMD (run-parts /etc/cron.hourly)
Mar 01 08:01:01 server.ayanlife.com run-parts(/etc/cron.hourly)[5054]: starting 0anacron
Mar 01 08:01:01 server.ayanlife.com run-parts(/etc/cron.hourly)[5060]: finished 0anacron
Mar 01 08:01:01 server.ayanlife.com systemd[1]: Removed slice User Slice of root.
-- Subject: Unit user-0.slice has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit user-0.slice has finished shutting down.
Mar 01 08:01:01 server.ayanlife.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d0:93:08:00 SRC=173.212.227.165 DST=144.126.137.13 LEN=60 TOS=0x00 PREC=0x00 TTL=60 ID=34697 DF PROTO=TCP SPT=52976 DPT=11000 WINDOW=64240 RES=0x00 SYN URGP=0
Mar 01 08:01:02 server.ayanlife.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d0:93:08:00 SRC=173.212.227.165 DST=144.126.137.13 LEN=60 TOS=0x00 PREC=0x00 TTL=60 ID=34698 DF PROTO=TCP SPT=52976 DPT=11000 WINDOW=64240 RES=0x00 SYN URGP=0
Mar 01 08:01:04 server.ayanlife.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d6:d9:08:00 SRC=151.80.239.126 DST=144.126.137.13 LEN=40 TOS=0x08 PREC=0x20 TTL=239 ID=45458 PROTO=TCP SPT=61000 DPT=24075 WINDOW=1024 RES=0x00 SYN URGP=0
Mar 01 08:01:07 server.ayanlife.com postfix/smtpd[5022]: warning: unknown[46.148.40.183]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Mar 01 08:01:07 server.ayanlife.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d6:d9:08:00 SRC=151.80.239.126 DST=144.126.137.13 LEN=40 TOS=0x08 PREC=0x20 TTL=239 ID=50447 PROTO=TCP SPT=61000 DPT=56286 WINDOW=1024 RES=0x00 SYN URGP=0
Mar 01 08:01:08 server.ayanlife.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d6:d9:08:00 SRC=151.80.239.126 DST=144.126.137.13 LEN=40 TOS=0x08 PREC=0x20 TTL=239 ID=56824 PROTO=TCP SPT=61000 DPT=610 WINDOW=1024 RES=0x00 SYN URGP=0
Mar 01 08:01:09 server.ayanlife.com postfix/smtpd[5022]: lost connection after AUTH from unknown[46.148.40.183]
Mar 01 08:01:09 server.ayanlife.com postfix/smtpd[5022]: disconnect from unknown[46.148.40.183] ehlo=1 auth=0/1 rset=1 commands=2/3
Mar 01 08:01:11 server.ayanlife.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d6:d9:08:00 SRC=151.80.239.126 DST=144.126.137.13 LEN=40 TOS=0x08 PREC=0x20 TTL=239 ID=18640 PROTO=TCP SPT=61000 DPT=27858 WINDOW=1024 RES=0x00 SYN URGP=0
Mar 01 08:01:13 server.ayanlife.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d6:d9:08:00 SRC=151.80.239.126 DST=144.126.137.13 LEN=40 TOS=0x08 PREC=0x20 TTL=239 ID=727 PROTO=TCP SPT=61000 DPT=22938 WINDOW=1024 RES=0x00 SYN URGP=0
Mar 01 08:01:14 server.ayanlife.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d6:d9:08:00 SRC=151.80.239.126 DST=144.126.137.13 LEN=40 TOS=0x08 PREC=0x20 TTL=239 ID=51950 PROTO=TCP SPT=61000 DPT=37336 WINDOW=1024 RES=0x00 SYN URGP=0
Mar 01 08:01:16 server.ayanlife.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d6:d9:08:00 SRC=151.80.239.126 DST=144.126.137.13 LEN=40 TOS=0x08 PREC=0x20 TTL=239 ID=54324 PROTO=TCP SPT=61000 DPT=42224 WINDOW=1024 RES=0x00 SYN URGP=0
Mar 01 08:01:18 server.ayanlife.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d6:d9:08:00 SRC=151.80.239.126 DST=144.126.137.13 LEN=40 TOS=0x08 PREC=0x20 TTL=239 ID=49321 PROTO=TCP SPT=61000 DPT=61935 WINDOW=1024 RES=0x00 SYN URGP=0
Mar 01 08:01:20 server.ayanlife.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d6:d9:08:00 SRC=151.80.239.126 DST=144.126.137.13 LEN=40 TOS=0x08 PREC=0x20 TTL=239 ID=62837 PROTO=TCP SPT=61000 DPT=33059 WINDOW=1024 RES=0x00 SYN URGP=0
Mar 01 08:01:22 server.ayanlife.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d6:d9:08:00 SRC=45.143.200.50 DST=144.126.137.13 LEN=40 TOS=0x08 PREC=0x40 TTL=237 ID=20459 PROTO=TCP SPT=56581 DPT=18162 WINDOW=1024 RES=0x00 SYN URGP=0
Mar 01 08:01:24 server.ayanlife.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d6:d9:08:00 SRC=151.80.239.126 DST=144.126.137.13 LEN=40 TOS=0x08 PREC=0x20 TTL=239 ID=37994 PROTO=TCP SPT=61000 DPT=61908 WINDOW=1024 RES=0x00 SYN URGP=0
Mar 01 08:01:26 server.ayanlife.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d6:d9:08:00 SRC=151.80.239.126 DST=144.126.137.13 LEN=40 TOS=0x08 PREC=0x20 TTL=239 ID=41163 PROTO=TCP SPT=61000 DPT=7834 WINDOW=1024 RES=0x00 SYN URGP=0
Mar 01 08:01:29 server.ayanlife.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d6:d9:08:00 SRC=151.80.239.126 DST=144.126.137.13 LEN=40 TOS=0x08 PREC=0x20 TTL=239 ID=12007 PROTO=TCP SPT=61000 DPT=51475 WINDOW=1024 RES=0x00 SYN URGP=0
Mar 01 08:01:31 server.ayanlife.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d6:d9:08:00 SRC=151.80.239.126 DST=144.126.137.13 LEN=40 TOS=0x08 PREC=0x20 TTL=239 ID=7965 PROTO=TCP SPT=61000 DPT=12704 WINDOW=1024 RES=0x00 SYN URGP=0
Mar 01 08:01:32 server.ayanlife.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d6:d9:08:00 SRC=94.102.61.47 DST=144.126.137.13 LEN=44 TOS=0x08 PREC=0x40 TTL=244 ID=54321 PROTO=TCP SPT=54987 DPT=3391 WINDOW=65535 RES=0x00 SYN URGP=0
Mar 01 08:01:35 server.ayanlife.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d6:d9:08:00 SRC=151.80.239.126 DST=144.126.137.13 LEN=40 TOS=0x08 PREC=0x20 TTL=239 ID=26604 PROTO=TCP SPT=61000 DPT=56867 WINDOW=1024 RES=0x00 SYN URGP=0
Mar 01 08:01:38 server.ayanlife.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d6:d9:08:00 SRC=151.80.239.126 DST=144.126.137.13 LEN=40 TOS=0x08 PREC=0x20 TTL=239 ID=54067 PROTO=TCP SPT=61000 DPT=5856 WINDOW=1024 RES=0x00 SYN URGP=0
Mar 01 08:01:40 server.ayanlife.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d6:d9:08:00 SRC=151.80.239.126 DST=144.126.137.13 LEN=40 TOS=0x08 PREC=0x20 TTL=239 ID=7225 PROTO=TCP SPT=61000 DPT=35691 WINDOW=1024 RES=0x00 SYN URGP=0
Mar 01 08:01:41 server.ayanlife.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d6:d9:08:00 SRC=151.80.239.126 DST=144.126.137.13 LEN=40 TOS=0x08 PREC=0x20 TTL=239 ID=9439 PROTO=TCP SPT=61000 DPT=7518 WINDOW=1024 RES=0x00 SYN URGP=0
Mar 01 08:01:42 server.ayanlife.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d6:d9:08:00 SRC=151.80.239.126 DST=144.126.137.13 LEN=40 TOS=0x08 PREC=0x20 TTL=239 ID=8762 PROTO=TCP SPT=61000 DPT=45149 WINDOW=1024 RES=0x00 SYN URGP=0
Mar 01 08:01:44 server.ayanlife.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d6:d9:08:00 SRC=151.80.239.126 DST=144.126.137.13 LEN=40 TOS=0x08 PREC=0x20 TTL=239 ID=16459 PROTO=TCP SPT=61000 DPT=12963 WINDOW=1024 RES=0x00 SYN URGP=0
Mar 01 08:01:46 server.ayanlife.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d6:d9:08:00 SRC=202.61.195.79 DST=144.126.137.13 LEN=60 TOS=0x08 PREC=0x40 TTL=48 ID=46550 DF PROTO=TCP SPT=60702 DPT=11000 WINDOW=42340 RES=0x00 SYN URGP=0
Mar 01 08:01:48 server.ayanlife.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d6:d9:08:00 SRC=151.80.239.126 DST=144.126.137.13 LEN=40 TOS=0x08 PREC=0x20 TTL=239 ID=64764 PROTO=TCP SPT=61000 DPT=17815 WINDOW=1024 RES=0x00 SYN URGP=0
Mar 01 08:01:50 server.ayanlife.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d6:d9:08:00 SRC=151.80.239.126 DST=144.126.137.13 LEN=40 TOS=0x08 PREC=0x20 TTL=239 ID=42479 PROTO=TCP SPT=61000 DPT=35807 WINDOW=1024 RES=0x00 SYN URGP=0
Mar 01 08:01:53 server.ayanlife.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d6:d9:08:00 SRC=151.80.239.126 DST=144.126.137.13 LEN=40 TOS=0x08 PREC=0x20 TTL=239 ID=62604 PROTO=TCP SPT=61000 DPT=363 WINDOW=1024 RES=0x00 SYN URGP=0
Mar 01 08:01:54 server.ayanlife.com kernel: Firewall: *UDP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d6:d9:08:00 SRC=143.244.50.172 DST=144.126.137.13 LEN=32 TOS=0x08 PREC=0x20 TTL=243 ID=54321 PROTO=UDP SPT=33808 DPT=3283 LEN=12
Mar 01 08:01:56 server.ayanlife.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d6:d9:08:00 SRC=151.80.239.126 DST=144.126.137.13 LEN=40 TOS=0x08 PREC=0x20 TTL=239 ID=57077 PROTO=TCP SPT=61000 DPT=11492 WINDOW=1024 RES=0x00 SYN URGP=0
Mar 01 08:01:56 server.ayanlife.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d0:93:08:00 SRC=95.111.253.90 DST=144.126.137.13 LEN=60 TOS=0x00 PREC=0x00 TTL=59 ID=3808 DF PROTO=TCP SPT=39056 DPT=11000 WINDOW=64240 RES=0x00 SYN URGP=0
Mar 01 08:01:59 server.ayanlife.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d6:d9:08:00 SRC=151.80.239.126 DST=144.126.137.13 LEN=40 TOS=0x08 PREC=0x20 TTL=239 ID=54707 PROTO=TCP SPT=61000 DPT=36585 WINDOW=1024 RES=0x00 SYN URGP=0
Mar 01 08:02:00 server.ayanlife.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d6:d9:08:00 SRC=151.80.239.126 DST=144.126.137.13 LEN=40 TOS=0x08 PREC=0x20 TTL=239 ID=59026 PROTO=TCP SPT=61000 DPT=44399 WINDOW=1024 RES=0x00 SYN URGP=0
Mar 01 08:02:03 server.ayanlife.com postfix/smtpd[5022]: connect from unknown[46.148.40.185]
Mar 01 08:02:04 server.ayanlife.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d6:d9:08:00 SRC=151.80.239.126 DST=144.126.137.13 LEN=40 TOS=0x08 PREC=0x20 TTL=239 ID=54025 PROTO=TCP SPT=61000 DPT=41501 WINDOW=1024 RES=0x00 SYN URGP=0
Mar 01 08:02:04 server.ayanlife.com postfix/smtpd[5195]: connect from unknown[46.148.40.199]
Mar 01 08:02:04 server.ayanlife.com postfix/smtpd[5022]: Anonymous TLS connection established from unknown[46.148.40.185]: TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)
Mar 01 08:02:04 server.ayanlife.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d6:d9:08:00 SRC=151.80.239.126 DST=144.126.137.13 LEN=40 TOS=0x08 PREC=0x20 TTL=239 ID=19528 PROTO=TCP SPT=61000 DPT=20751 WINDOW=1024 RES=0x00 SYN URGP=0
Mar 01 08:02:04 server.ayanlife.com postfix/smtpd[5195]: Anonymous TLS connection established from unknown[46.148.40.199]: TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)
Mar 01 08:02:06 server.ayanlife.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d6:d9:08:00 SRC=151.80.239.126 DST=144.126.137.13 LEN=40 TOS=0x08 PREC=0x20 TTL=239 ID=62539 PROTO=TCP SPT=61000 DPT=10120 WINDOW=1024 RES=0x00 SYN URGP=0
Mar 01 08:02:08 server.ayanlife.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:49:b3:6a:98:5d:82:47:d6:d9:08:00 SRC=151.80.239.126 DST=144.126.137.13 LEN=40 TOS=0x08 PREC=0x20 TTL=239 ID=27190 PROTO=TCP SPT=61000 DPT=4636 WINDOW=1024 RES=0x00 SYN URGP=0
 

Offline
*****
Re: Varnish problem with woocommerce
« Reply #2 on: March 11, 2023, 10:48:17 PM »
The log file seems clear to me -- the if statement on line 50 (or one line above/below) is at fault:
Code: [Select]
Mar 01 07:55:27 server.ayanlife.com varnishd[4116]: Found: 'if' at
Mar 01 07:55:27 server.ayanlife.com varnishd[4116]: ('/etc/varnish/default.vcl' Line 50 Pos 1)
Comment it out and test...

Pssst -- I would sanitize IP addresses in your posted logs... well, not the Iran one -- that doesn't matter...