<div dir="ltr"><br><br><div class="gmail_quote">On Wed, Mar 14, 2012 at 2:02 PM, ik <span dir="ltr">&lt;<a href="mailto:idokan@gmail.com">idokan@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">On Wed, Mar 14, 2012 at 13:30, shimi &lt;<a href="mailto:linux-il@shimi.net">linux-il@shimi.net</a>&gt; wrote:<br>
&gt;<br>
&gt; On Wed, Mar 14, 2012 at 1:23 PM, ik &lt;<a href="mailto:idokan@gmail.com">idokan@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Hello,<br>
&gt;&gt;<br>
&gt;&gt; I&#39;m trying to detect a layer 7 based HTTP request, and see if it<br>
&gt;&gt; contain headers that provided as spoofed IP address.<br>
&gt;&gt; Is there a way to detect what is the Ethernet that the request arrived<br>
&gt;&gt; from at apace level ?<br>
&gt;&gt;<br>
&gt;&gt; If so, how can I provide rules what to do according to an HTTP header<br>
&gt;&gt; fields ?<br>
&gt;&gt;<br>
&gt;<br>
&gt; You could look at the ARP cache by reading /proc/net/arp I guess.<br>
&gt;<br>
&gt; You ARE aware that Ethernet MACs, just like IPs, can be &#39;spoofed&#39;, right?<br>
<br>
</div>Yes, but it&#39;s not what I need to work upon.<br>
<div class="im"><br>
&gt;<br>
&gt; If your LAN is insecure, secure your LAN. Don&#39;t run web applications on<br>
&gt; unsecure networks...<br>
<br>
</div>My web app require to work also over the internet, and not only LAN<br>
(client request), that&#39;s why I&#39;m looking for a way to secure it<br>
further.<br>
<br></blockquote><div><br>I suspected that&#39;s going to be your reply... <br><br>MAC is meaningless outside Layer 2. <br><br>You can&#39;t do anything MAC related for clients outside your subnet. All Ethernet frames will arrive from the MAC of your router.<br>

<br>The way to secure a website over HTTP, for the last few decades, has been by using SSL, signed by a mutually trusted CA. <br><br>If you want to authenticate the clients, there&#39;s an option to request a client certificate during the SSL negotiation.<br>

<br>-- Shimi<br></div></div><br></div>