<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Send post&#x2F;get on firewall rule match?]]></title><description><![CDATA[<p dir="auto">is it possible to somehow implement not only a logging action when a firewall rule applies but to start a script or issue a http request?<br />
currently i am watching network traffic using scapy with python and when the amazon dash button is pressed and tries to contact amazon the script issues a http request to a api.</p>
<p dir="auto">as this scapy script is consuming extremely much ressources and as i anyway block the dash button to reach the internet i think about implementing the api call via pfsense.</p>
<p dir="auto">of course i could monitor the firewall log with a shell script but this is only my 2nd choice.</p>
<p dir="auto">thx</p>
]]></description><link>https://forum.netgate.com/topic/117275/send-post-get-on-firewall-rule-match</link><generator>RSS for Node</generator><lastBuildDate>Sat, 13 Jun 2026 21:57:32 GMT</lastBuildDate><atom:link href="https://forum.netgate.com/topic/117275.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 23 Jun 2017 07:56:12 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Send post&#x2F;get on firewall rule match? on Sun, 25 Jun 2017 08:49:40 GMT]]></title><description><![CDATA[<p dir="auto">i have done the following and it works:</p>
<p dir="auto">NAT - Port Forward:</p>
<p dir="auto">Interface: the interface the dash buttons are on (wifi-net)<br />
Protocoll: Tcp<br />
Source Adress: The IP of the Dash button<br />
Souce Ports: *<br />
Destination Adress: *<br />
Destination Ports: 443 (as the dash buttons try to establish a ssl-connection to amazon when pressed)<br />
Nat IP: The IP of the Computer on the Net which shall receive the info that the dash buttons try to connect to the internet aka have been pressed<br />
NAT Ports: 4321 (anyone does, no portrange needed, as the buttons only try to connect to :443)<br />
Corresponding Firewall Rule: Pass</p>
<p dir="auto">On the Nat IP-machine I can receive the connection requests using scapy in python:</p>
<p dir="auto">from scapy.all import *<br />
p = sniff(filter="tcp and port 4321", store=0)<br />
print p[IP].src</p>
<p dir="auto">Every Button Press generates 5 requests.</p>
<p dir="auto">Problem : Scapy uses a lot of ressources, will take ~30% CPU on a Raspy B.</p>
<p dir="auto">Problem2: I didnt manage to use socket  module, as the buttons dont really connect, they just send ssl-syn and receive some multiple acks from the nat-ip.</p>
<p dir="auto">Here's what Wireshark shows (running on the Nat-IP machine; *.127 is the dash button, *.125 is the Nat-IP client machine):<br />
<a href="https://ibb.co/hwwi55" target="_blank" rel="noopener noreferrer nofollow ugc">https://ibb.co/hwwi55</a><br />
<img src="https://ibb.co/hwwi55" alt="" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.netgate.com/post/707843</link><guid isPermaLink="true">https://forum.netgate.com/post/707843</guid><dc:creator><![CDATA[willi9999]]></dc:creator><pubDate>Sun, 25 Jun 2017 08:49:40 GMT</pubDate></item><item><title><![CDATA[Reply to Send post&#x2F;get on firewall rule match? on Fri, 23 Jun 2017 10:26:02 GMT]]></title><description><![CDATA[<p dir="auto">thanks. a ids would be the solution "shell script that monitors the logs". i would really love to have the action triggered by the process which logs or which triggers the log.</p>
<p dir="auto">the dash buttons are completely blocked. the buttons just reach out to amazon. the api call has to be made by a script. the script action is triggered by the dash - requests on the lan. see<br />
https://community.smartthings.com/t/hack-the-amazon-dash-button-to-control-a-smartthings-switch/20427</p>
]]></description><link>https://forum.netgate.com/post/707568</link><guid isPermaLink="true">https://forum.netgate.com/post/707568</guid><dc:creator><![CDATA[willi9999]]></dc:creator><pubDate>Fri, 23 Jun 2017 10:26:02 GMT</pubDate></item><item><title><![CDATA[Reply to Send post&#x2F;get on firewall rule match? on Fri, 23 Jun 2017 09:57:20 GMT]]></title><description><![CDATA[<p dir="auto">afaik you could use an ids like snort or suricata. they can monitor/filter traffic for post/get.</p>
<p dir="auto">do the dash buttons get to the api via url or ip?<br />
if its via url, then you could redirect the dns to localhost.<br />
if its via ip, then you could block the ip completely.</p>
<p dir="auto">but since i guess the dash buttons have a normal ip in the lan, why not block their internet access completely by a firewall rule?</p>
]]></description><link>https://forum.netgate.com/post/707564</link><guid isPermaLink="true">https://forum.netgate.com/post/707564</guid><dc:creator><![CDATA[Birke]]></dc:creator><pubDate>Fri, 23 Jun 2017 09:57:20 GMT</pubDate></item></channel></rss>