From 4f0719ffe0adbde4e26dec69f063daa3940c0a53 Mon Sep 17 00:00:00 2001 From: Stefan Midjich Date: Sun, 17 Apr 2016 00:22:13 +0200 Subject: [PATCH] HTTP_X_FORWARDED_FOR support. --- plugins/iptables.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/iptables.py b/plugins/iptables.py index bc86090..28347c0 100644 --- a/plugins/iptables.py +++ b/plugins/iptables.py @@ -25,7 +25,10 @@ def run(arg): l.addHandler(logHandler) l.setLevel(DEBUG) - client_ip = environ.get('REMOTE_ADDR') + client_ip = environ.get( + 'HTTP_X_FORWARDED_FOR', + environ.get('REMOTE_ADDR') + ) client_mac = None error_msg = None iptables_failed = False