Building Linux Virtual Private Networks
(view this code in a separate window)
#!/bin/sh
#
# Note:
# Replace tap0 with $NETNAME, if you are using universal TUN/TAP driver
#
# bring interface down first
ifconfig tap0 down

# required by tinc
# sets up tap0 MAC address to a special value
# to ensure that tinc tunneling works
ifconfig tap0 hw ether fe:fd:00:00:00:00

# tinc interface's IP address
#
# For peer A, use:
# ifconfig tap0 192.168.1.1 netmask 255.255.255.0
#
# For peer B, use:
# ifconfig tap0 192.168.2.1 netmask 255.255.255.0
#
# For peer C, use:
# ifconfig tap0 192.168.3.1 netmask 255.255.255.0
#
# For peer D, use:
# ifconfig tap0 192.168.4.1 netmask 255.255.255.0

# make sure you have this line to disable ARP on
# the tinc interface
# (should not be necessary anymore in tinc v1.0)
ifconfig tap0 -arp

Home
Contents
Authors
Reviews
Errata
Colophon
Source Code
Sample Chapter
Suggested Reading
Purchase

New Riders Publishing