All of lore.kernel.org
 help / color / mirror / Atom feed
* Dropbear configuration
@ 2015-05-29 14:40 Matthew Karas
  2015-07-25  0:02 ` Khem Raj
  0 siblings, 1 reply; 2+ messages in thread
From: Matthew Karas @ 2015-05-29 14:40 UTC (permalink / raw)
  To: yocto@yoctoproject.org

I am trying to configure dropbear to do the following.

1) Only listen on port 22 of the tun0 interface (made by openvpn service).
2) Only use public key authorization.

To do this I've overridden the dropbear.socket file with my own.

---------------------------------------------------- start
[Unit]
Conflicts=dropbear.service
After=openvpn@foo.service
Wants=openvpn@foo.service

[Socket]
ListenStream=22
Accept=yes
BindToDevice=tun0  <<<<<<< made by open vpn

[Install]
WantedBy=sockets.target
Also=dropbearkey.service

----------------------------------------------------finish

I also install my public key to where I think dropbear needs the keys.

--------bb append snippet-----------------------------------
do_install_append() {
    install -d ${D}/root/.ssh
    install -m 0600 ${WORKDIR}/authorized_keys ${D}/root/.ssh/authorized_keys
    echo 'DROPBEAR_EXTRA_ARGS="-E -g"'> ${D}${sysconfdir}/default/dropbear
}

FILES_${PN} += "/home/root/.ssh/authorized_keys"
-------------------------------------------------------------------

Currently the system finds a system ordering loop and shuts down openvpn.

How do I get the dropbear.socket to depend on openvpn - when openvpn
depends on the sockets being up  (and sockets.target wants
dropbear.socket)?  Is there another way to have dropbear only look at
the tun0 port 22 and not the eth0 port 22?

Thanks


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Dropbear configuration
  2015-05-29 14:40 Dropbear configuration Matthew Karas
@ 2015-07-25  0:02 ` Khem Raj
  0 siblings, 0 replies; 2+ messages in thread
From: Khem Raj @ 2015-07-25  0:02 UTC (permalink / raw)
  To: Matthew Karas; +Cc: yocto@yoctoproject.org

On 15-05-29 10:40:35, Matthew Karas wrote:
> I am trying to configure dropbear to do the following.
> 
> 1) Only listen on port 22 of the tun0 interface (made by openvpn service).
> 2) Only use public key authorization.
> 
> To do this I've overridden the dropbear.socket file with my own.
> 
> ---------------------------------------------------- start
> [Unit]
> Conflicts=dropbear.service
> After=openvpn@foo.service
> Wants=openvpn@foo.service

may be ise 'Requires' here

> 
> [Socket]
> ListenStream=22
> Accept=yes
> BindToDevice=tun0  <<<<<<< made by open vpn
> 
> [Install]
> WantedBy=sockets.target
> Also=dropbearkey.service
> 
> ----------------------------------------------------finish
> 
> I also install my public key to where I think dropbear needs the keys.
> 
> --------bb append snippet-----------------------------------
> do_install_append() {
>     install -d ${D}/root/.ssh
>     install -m 0600 ${WORKDIR}/authorized_keys ${D}/root/.ssh/authorized_keys
>     echo 'DROPBEAR_EXTRA_ARGS="-E -g"'> ${D}${sysconfdir}/default/dropbear
> }
> 
> FILES_${PN} += "/home/root/.ssh/authorized_keys"
> -------------------------------------------------------------------
> 
> Currently the system finds a system ordering loop and shuts down openvpn.
> 
> How do I get the dropbear.socket to depend on openvpn - when openvpn
> depends on the sockets being up  (and sockets.target wants
> dropbear.socket)?  Is there another way to have dropbear only look at
> the tun0 port 22 and not the eth0 port 22?
> 
> Thanks
> -- 
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-07-24 23:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-29 14:40 Dropbear configuration Matthew Karas
2015-07-25  0:02 ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.