Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unix Socket Support? #124

Open
monkburger opened this issue Dec 13, 2023 · 0 comments
Open

Unix Socket Support? #124

monkburger opened this issue Dec 13, 2023 · 0 comments

Comments

@monkburger
Copy link

Similar to #78 - I'm using the following setup;

Nginx -> Caddy + Coraza -> Apache

Nginx is doing TLS Termination, and Caddy is talking to Nginx over a UDS, and finally, a basic connection to Apache (can't seem to finally get away from .htaccess)

Anyways, a remote CURL on a mocked domains throws this:

2023/12/13 11:51:38.033 error http.handlers.waf [client ""] Coraza: Access denied (phase 2). [file ""] [line "2"] [id "1"] [rev ""] [msg ""] [data ""] [severity "emergency"] [ver ""] [maturity "0"] [accuracy "0"] [hostname ""] [uri "/"] [unique_id "HWbmWIpvlOLuYhQN"]

Meanwhile, a local curl command to a UNIX domain socket throws this as well:

2023/12/13 11:52:37.089 error http.handlers.waf [client ""] Coraza: Access denied (phase 2). [file ""] [line "2"] [id "1"] [rev ""] [msg ""] [data ""] [severity "emergency"] [ver ""] [maturity "0"] [accuracy "0"] [hostname ""] [uri "/"] [unique_id "kISnrvTyehgtqnNc"]

When SecRuleEngine is off, it works as expected.

Basic config to repo this issue, eg:


{
	debug
	auto_https off
	order coraza_waf first
	log {
		output file "/tmp/caddy.log"
	}

	servers {
		trusted_proxies static private_ranges
	}
}

http://test.test {
	log {
		level DEBUG
		output file /tmp/caddy_test.log
	}

	coraza_waf {
		load_owasp_crs
		directives `
		SecAction "id:1,pass,log"
		Include @coraza.conf-recommended
		Include @crs-setup.conf.example
		Include @owasp_crs/*.conf
		SecRuleEngine On
		`
	}
	bind unix//run/caddy
        # Apache HTTP on 81 
	reverse_proxy http://localhost:81
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant