Giter VIP home page Giter VIP logo

opnsense-packer's Introduction

WAT

Create a deployable image of opensense for google compute or AWS EC. You build from the offiicial iso, so no tampering with the files. A customer config.xml is deployed so you can SSH boot into your box, see "after deployed" to see what you need to revert so you are back to the default

You will build using Packer

requirements

  • Install Packer
  • You need to download the opnsense.iso (16.7) and unpack it into this repo as opnsense.iso
wget https://mirror.auf-feindgebiet.de/opnsense/releases/mirror/OPNsense-16.7-OpenSSL-cdrom-amd64.iso.bz2
bunzip2 OPNsense-16.7-OpenSSL-cdrom-amd64.iso.bz2
mv OPNsense-16.7-OpenSSL-cdrom-amd64.iso opnsense.iso

This is yet needed since packer cannot (yet) download and unpack isos, it only can download non-archived isos

build

packer build opnsense.json

after you deployed the image

Of course, chaneg the configuration to your likings, but very specificly change

  • !!!! change your root password !!!!
  • !!!! change your root password !!!!
  • secure your SSH port which yet accessible through WAN
  • secure your webGUI port which yet accessible through WAN
  • enable bogus/private ip blocking on WAN which is disabled
  • disable SSH if you do not need it
  • disable SSH password access after you deployed your ssh key, if you leave SSH enabled

Since this has been adjusted so you can deploy a cloud image at all, right :)

Debug

add this to the vbox to be able to access the box

		,
        [
          "modifyvm",
          "{{.Name}}",
          "--natpf1",
          "managinggui,tcp,127.0.0.1,10443,,443"
        ],
        [
          "modifyvm",
          "{{.Name}}",
          "--natpf1",
          "ssh,tcp,127.0.0.1,10022,,22"
        ]

opnsense-packer's People

Contributors

eugenmayer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.