unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Christopher Lemmer Webber <cwebber@dustycloud.org>
To: help-guix@gnu.org
Subject: Port forwarding and `guix system vm`
Date: Tue, 07 Jul 2020 14:16:23 -0400	[thread overview]
Message-ID: <87blkrgphk.fsf@dustycloud.org> (raw)

Hello!

I've been trying to figure out how to do port forwarding with
`guix system vm` and have not (alas) yet succeeded.

Here's what I've tried so far:

  # testing forwarding http
  `guix system vm guix-config-dustycloud.scm --share=$HOME/tmp/guix-vm-exchange=/exchange` -nic hostfwd=tcp::8088-:80
  # testing forwarding ssh
  `guix system vm guix-config-dustycloud.scm --share=$HOME/tmp/guix-vm-exchange=/exchange` -nic hostfwd=tcp::10022-:22

In both the case of trying to ssh and trying to access via a web
browser, it just hangs.

I can also add all the rest of the -nic stuff the manual recommends:

  `guix system vm guix-config-dustycloud.scm --share=$HOME/tmp/guix-vm-exchange=/exchange` -nic user,model=virtio-net-pci,hostfwd=tcp::8088-:80

... same problem.  (However, it looks like the script adds the
virtio-net-pci and stuff these days, so I'm not sure that stuff is
necessary...)

Any ideas?

config looks like:

  (operating-system
    (host-name "dustycloud")
    (timezone "America/")
    (locale "en_US.UTF-8")

    ;; TODO: this will need to switch out depending on if this is in a local VM or not
    (bootloader (grub-configuration (target "/dev/sda")))
    (file-systems (cons (file-system
                          (device "/dev/sda1")
                          (mount-point "/")
                          (type "ext4"))
                        %base-file-systems))

    (users (cons (user-account
                  (name "cwebber")
                  (group "users")
                  ;; Adding the account to the "wheel" group
                  ;; makes it a sudoer.
                  (supplementary-groups '("wheel"))
                  (home-directory "/home/cwebber"))
                 %base-user-accounts))

    (packages (cons* tcpdump
                     nss-certs         ;for HTTPS access
                     gnutls
                     git
                     rsync
                     openssh
                     lynx
                     %base-packages))

    (services (cons* (service openssh-service-type
                              (openssh-configuration
                               (password-authentication? #f)
                               (authorized-keys
                                `(("cwebber" ,(local-file "/home/cwebber/.ssh/id_rsa.pub"))))))
                     (service mcron-service-type
                              (mcron-configuration (jobs (list %gc-job))))
                     (service nginx-service-type
                              (nginx-configuration
                               (server-blocks
                                (list (nginx-server-configuration
                                       (server-name '("www.dustycloud.org" "dustycloud.org"))
                                       (root "/srv/http/dustycloud.org")
                                       (listen '("80")))))))
                     %base-services)))


             reply	other threads:[~2020-07-07 18:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-07 18:16 Christopher Lemmer Webber [this message]
2020-07-07 19:59 ` Port forwarding and `guix system vm` Jan Nieuwenhuizen
2020-07-07 20:18   ` Christopher Lemmer Webber
2020-07-07 23:21     ` Christopher Lemmer Webber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87blkrgphk.fsf@dustycloud.org \
    --to=cwebber@dustycloud.org \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).