Skip to content

Instantly share code, notes, and snippets.

@paulc
Created December 27, 2011 18:57
Show Gist options
  • Save paulc/1524788 to your computer and use it in GitHub Desktop.
Save paulc/1524788 to your computer and use it in GitHub Desktop.
VDS6 FreeBSD Setup

pkg_add:

vim-lite 
sudo 
zsh 

/etc/rc.conf:

sshd_enable="YES" 
hostname="vds6.pchak.net"

/etc/rc.d/DAEMON:

#!/bin/sh
#
# $FreeBSD: src/etc/rc.d/DAEMON,v 1.6.2.1 2009/08/03 08:13:06 kensmith Exp $
#

# PROVIDE: DAEMON
# REQUIRE: NETWORKING SERVERS

# Ensure that IPv6 interfaces have completed DAD (not marked 'tentative')

tick=0

while ifconfig -a inet6 | grep -q tentative
do
    echo "Waiting for inet6 DAD"
    tick=$((tick+1))
    if [ $tick -gt 5 ]
    then
        echo "DAD timeout"
        break
    fi
    sleep 1
done

/etc/ssh/sshd_config:

Port 22 
AddressFamily any
ListenAddress 0.0.0.0
ListenAddress ::

/usr/local/etc/nginx/nginx.conf

-- nginx.conf	2011-12-25 22:25:16.000000000 +0000
+++ nginx.conf.orig	2011-12-19 13:48:26.000000000 +0000
@@ -33,8 +33,7 @@
     #gzip  on;
 
     server {
-
-        listen [2a01:4f8:150:1102::fa]:80;
+        listen       80;
         server_name  localhost;
 
         #charset koi8-r;

/usr/local/etc/sudoers:

--- /usr/local/etc/sudoers	2011-12-25 22:08:40.000000000 +0000
+++ /usr/local/etc/sudoers.sample	2011-10-30 17:44:26.000000000 +0000
@@ -80,7 +80,7 @@
 root ALL=(ALL) ALL
 
 ## Uncomment to allow members of group wheel to execute any command
-%wheel ALL=(ALL) ALL
+# %wheel ALL=(ALL) ALL
 
 ## Same thing without a password
 # %wheel ALL=(ALL) NOPASSWD: ALL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment