[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fwknop-discuss
Subject:    Re: [Fwknop-discuss] Fwknop doesn't open closed SSH port.
From:       Tomáš Iglo <tom.iglo () gmail ! com>
Date:       2016-07-14 22:54:13
Message-ID: CAD_NjCHRcRZ9JM-d5FgN1D5QG9kZwV8WsXFt-5qMLrfjU1xHVA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi Jonathan,

thanks a lot, now it works as you wrote ;)

Thank you man.

Have a nice day,

Tom

2016-07-15 0:05 GMT+02:00 Jonathan Bennett <jbscience87@gmail.com>:

> Hello,
>
> The SSH access setting in Openwrt sets which interface dropbear will bind
> to.  This means that dropbear will only accept ssh connections that arriv=
e
> on that specific interface.  If all you need to do is connect from inside
> your network, then binding to LAN is fine.
> If you want to access ssh from anywhere else, then you need to instruct
> dropbear to bind to all interfaces.  This idea of binding to an interface
> is different from a firewall, though they do something of the same thing.
>
> What you probably want, is to tell dropbear to listen to all interfaces,
> and then make sure your firewall is configured to drop all incoming
> connections from the outside.  In that case, any SSH connections will be
> dropped, and your ssh service will be invisible to the outside world.
> Fwknop comes into play here.  It allows you to authenticate, and a
> temporary rule is added, allowing only your IP address to connect to the
> ssh service.
>
> So, set dropbear back to unspecified, and then look at your firewall
> settings.  In the web interface, go to Network-> Firewall.  Under zones,
> Input and Forward should be set to reject for the wan network.  You might
> have a rule in the "Traffic Rules" tab that is allowing ssh connections.
> I suppose one other thing to check is that in Network-> Interfaces, the
> wan interface is set to use the wan firewall zone.
>
> --Jonathan
>
> On 07/14/2016 04:43 PM, Tom=C3=A1=C5=A1 Iglo wrote:
> > Hi,
> > in my OpenWRT (Chaos Calmer) if I've configured SSH Access in Dropbear
> to listening on WAN interface, SSH access is working and I can login to
> router via SSH to it, but this means, that my SSH port is open to the
> Internet.
> >
> > If I've configured SSH Access to LAN interface (as it is by default)
> fwknop2 sends SPA packet, in systemLog it shows me that port is open for
> that external IP for some time:
> >
> > Thu Jul 14 23:05:07 2016 daemon.info <http://daemon.info>
> fwknopd[7244]: (stanza #1) SPA Packet from IP: 46.XX.XX.XX received with
> access source match
> > Thu Jul 14 23:05:07 2016 daemon.info <http://daemon.info>
> fwknopd[7244]: Added access rule to FWKNOP_INPUT for 46.XX.XX.XX ->
> 0.0.0.0/0 <http://0.0.0.0/0> tcp/22, expires at 1468530367
> > Thu Jul 14 23:06:07 2016 daemon.info <http://daemon.info>
> fwknopd[7244]: Removed rule 1 from FWKNOP_INPUT with expire time of
> 1468530367
> >
> > but my SSH connection fails to "Connection timeout".
> >
> > Should be SSH Access setup to the LAN, right? Is this configuration
> below wrong?
> >
> > My setup:
> > - Using ssh keys, which are mentioned in /etc/dropbear/authorized_keys
> >
> > - UCI:
> > password - OFF
> > rootLogin - OFF
> >
> > - OpenWRT - System - Administration - SSH Access - Dropbear instance -
> Interface: LAN
> >
> > - Names of interfaces:
> > WAN: eth0.1
> > LAN: br-lan
> >
> > - access.conf
> > SOURCE ANY
> > keytype Base 64 key
> > hkeytype Base 64 key
> > KEY_BASE64 xxxxxx
> > HMAC_KEY_BASE64 xxxxxxx
> > OPEN_PORTS tcp/22
> >
> > - fwknopd.conf
> > PCAP_INTF eth0.1
> > ENABLE_IPT_FORWARDING y
> >
> >
> > Thank you for your help.
> >
> > Have a nice day,
> >
> > Tomas
> >
> >
> >
> -------------------------------------------------------------------------=
-----
> > What NetFlow Analyzer can do for you? Monitors network bandwidth and
> traffic
> > patterns at an interface-level. Reveals which users, apps, and protocol=
s
> are
> > consuming the most bandwidth. Provides multi-vendor support for NetFlow=
,
> > J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning
> > reports.http://sdm.link/zohodev2dev
> >
> >
> >
> > _______________________________________________
> > Fwknop-discuss mailing list
> > Fwknop-discuss@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/fwknop-discuss
> >
>
>
>

[Attachment #5 (text/html)]

<div dir="ltr">Hi Jonathan,<div><br></div><div>thanks a lot, now it works as you \
wrote ;)</div><div><br></div><div>Thank you man.</div><div><br></div><div>Have a nice \
day,</div><div><br></div><div>Tom</div></div><div class="gmail_extra"><br><div \
class="gmail_quote">2016-07-15 0:05 GMT+02:00 Jonathan Bennett <span dir="ltr">&lt;<a \
href="mailto:jbscience87@gmail.com" \
target="_blank">jbscience87@gmail.com</a>&gt;</span>:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">Hello,<br> <br>
The SSH access setting in Openwrt sets which interface dropbear will bind to.   This \
means that dropbear will only accept ssh connections that arrive on that specific \
interface.   If all you need to do is connect from inside your network, then binding \
to LAN is fine.<br> If you want to access ssh from anywhere else, then you need to \
instruct dropbear to bind to all interfaces.   This idea of binding to an interface \
is different from a firewall, though they do something of the same thing.<br> <br>
What you probably want, is to tell dropbear to listen to all interfaces, and then \
make sure your firewall is configured to drop all incoming connections from the \
outside.   In that case, any SSH connections will be dropped, and your ssh service \
will be invisible to the outside world.<br> Fwknop comes into play here.   It allows \
you to authenticate, and a temporary rule is added, allowing only your IP address to \
connect to the ssh service.<br> <br>
So, set dropbear back to unspecified, and then look at your firewall settings.   In \
the web interface, go to Network-&gt; Firewall.   Under zones, Input and Forward \
should be set to reject for the wan network.   You might have a rule in the \
&quot;Traffic Rules&quot; tab that is allowing ssh connections.<br> I suppose one \
other thing to check is that in Network-&gt; Interfaces, the wan interface is set to \
use the wan firewall zone.<br> <br>
--Jonathan<br>
<span class=""><br>
On 07/14/2016 04:43 PM, Tomáš Iglo wrote:<br>
&gt; Hi,<br>
&gt; in my OpenWRT (Chaos Calmer) if I&#39;ve configured SSH Access in Dropbear to \
listening on WAN interface, SSH access is working and I can login to router via SSH \
to it, but this means, that my SSH port is open to the Internet.<br> &gt;<br>
&gt; If I&#39;ve configured SSH Access to LAN interface (as it is by default) fwknop2 \
sends SPA packet, in systemLog it shows me that port is open for that external IP for \
some time:<br> &gt;<br>
</span>&gt; Thu Jul 14 23:05:07 2016 <a href="http://daemon.info" rel="noreferrer" \
target="_blank">daemon.info</a> &lt;<a href="http://daemon.info" rel="noreferrer" \
target="_blank">http://daemon.info</a>&gt; fwknopd[7244]: (stanza #1) SPA Packet from \
IP: 46.XX.XX.XX received with access source match<br> &gt; Thu Jul 14 23:05:07 2016 \
<a href="http://daemon.info" rel="noreferrer" target="_blank">daemon.info</a> &lt;<a \
href="http://daemon.info" rel="noreferrer" target="_blank">http://daemon.info</a>&gt; \
fwknopd[7244]: Added access rule to FWKNOP_INPUT for 46.XX.XX.XX -&gt; <a \
href="http://0.0.0.0/0" rel="noreferrer" target="_blank">0.0.0.0/0</a> &lt;<a \
href="http://0.0.0.0/0" rel="noreferrer" target="_blank">http://0.0.0.0/0</a>&gt; \
tcp/22, expires at 1468530367<br> &gt; Thu Jul 14 23:06:07 2016 <a \
href="http://daemon.info" rel="noreferrer" target="_blank">daemon.info</a> &lt;<a \
href="http://daemon.info" rel="noreferrer" target="_blank">http://daemon.info</a>&gt; \
fwknopd[7244]: Removed rule 1 from FWKNOP_INPUT with expire time of 1468530367<br> \
<span class="">&gt;<br> &gt; but my SSH connection fails to &quot;Connection \
timeout&quot;.<br> &gt;<br>
&gt; Should be SSH Access setup to the LAN, right? Is this configuration below \
wrong?<br> &gt;<br>
&gt; My setup:<br>
&gt; - Using ssh keys, which are mentioned in /etc/dropbear/authorized_keys<br>
&gt;<br>
&gt; - UCI:<br>
&gt; password - OFF<br>
&gt; rootLogin - OFF<br>
&gt;<br>
&gt; - OpenWRT - System - Administration - SSH Access - Dropbear instance - \
Interface: LAN<br> &gt;<br>
&gt; - Names of interfaces:<br>
&gt; WAN: eth0.1<br>
&gt; LAN: br-lan<br>
&gt;<br>
&gt; - access.conf<br>
&gt; SOURCE ANY<br>
&gt; keytype Base 64 key<br>
&gt; hkeytype Base 64 key<br>
&gt; KEY_BASE64 xxxxxx<br>
&gt; HMAC_KEY_BASE64 xxxxxxx<br>
&gt; OPEN_PORTS tcp/22<br>
&gt;<br>
&gt; - fwknopd.conf<br>
&gt; PCAP_INTF eth0.1<br>
&gt; ENABLE_IPT_FORWARDING y<br>
&gt;<br>
&gt;<br>
&gt; Thank you for your help.<br>
&gt;<br>
&gt; Have a nice day,<br>
&gt;<br>
&gt; Tomas<br>
&gt;<br>
&gt;<br>
</span>&gt; ------------------------------------------------------------------------------<br>
 &gt; What NetFlow Analyzer can do for you? Monitors network bandwidth and \
traffic<br> &gt; patterns at an interface-level. Reveals which users, apps, and \
protocols are<br> &gt; consuming the most bandwidth. Provides multi-vendor support \
for NetFlow,<br> &gt; J-Flow, sFlow and other flows. Make informed decisions using \
capacity planning<br> &gt; reports.<a href="http://sdm.link/zohodev2dev" \
rel="noreferrer" target="_blank">http://sdm.link/zohodev2dev</a><br> &gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Fwknop-discuss mailing list<br>
&gt; <a href="mailto:Fwknop-discuss@lists.sourceforge.net">Fwknop-discuss@lists.sourceforge.net</a><br>
 &gt; <a href="https://lists.sourceforge.net/lists/listinfo/fwknop-discuss" \
rel="noreferrer" target="_blank">https://lists.sourceforge.net/lists/listinfo/fwknop-discuss</a><br>
 &gt;<br>
<br>
<br>
</blockquote></div><br></div>



------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev

_______________________________________________
Fwknop-discuss mailing list
Fwknop-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fwknop-discuss


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic