defhost () {
host=$1
addword allhosts $host
- eval host_type_$host=endsys
+ eval host_type_$host=server
}
-## router
+## hosttype TYPE
##
-## Declare the host to be a router, so it should forward packets and so on.
-router () {
- eval host_type_$host=router
+## Declare the host to have the given type.
+hosttype () {
+ type=$1
+ case $type in
+ router | server | client) ;;
+ *) echo >&2 "$0: bad host type \`$type'"; exit 1 ;;
+ esac
+ eval host_type_$host=$type
}
## iface IFACE NET ...
## House hosts.
defhost radius
- router
+ hosttype router
iface eth0 dmz unsafe safe
iface eth1 dmz unsafe safe
iface eth2 safe
iface eth0 dmz unsafe
iface eth1 dmz unsafe
defhost vampire
- router
+ hosttype router
iface eth0.0 dmz unsafe safe
iface eth0.1 dmz unsafe safe
iface eth0.2 safe
iface br-unsafe unsafe
defhost gibson
+ hosttype client
iface eth0 unsafe
## Colocated networks.
iface br-jump jump colo
iface br-colo jump colo
defhost precision
- router
+ hosttype router
iface eth0 jump colo
iface eth1 jump colo
iface vpn-vampire housebdry vpn