T1 Point to Point Example
This howto shows how to connect two IPCop routers via Sangoma S514 or A101 T1 cards. This information should be very similar for other Sangoma cards and might prove useful to those with other requirements.
This howto is only a starting point, but it does show how to connect two LANs with trusted access to each other via a T1 point to point connection. Adjust as necessary to meet your security requirements.
Reference
Sangoma has good documentation and tech support. However, much documentation is very old and their phone support is not what it once was.
On the bright side, their products have proven quite reliable over the last few years and they offer a significant cost savings.
Sample configuration files are located in /etc/wanpipe/samples. However, the wancfg utility will normally create them for you.
Testing
If you have a problem, reboot the IPCop router. Someday, we'll try moving the routing and firewalling commands to the Start Script and Stop Script under Advanced Wanpipe Options. If we did that we could just 'wanrouter stop' and 'wanrouter start' to restart the T1 interfaces, routing and firewalling. As it is now, the routing and firewalling commands only get run at boot time.
It is incredibly helpful to use a T1 crossover cable for convenient testing before installing the IPCop router in the field. Remember to set one of your IPCop routers to provide the 'Master' T1 clock signal when using the crossover cable (normally, the telco provides clocking).
http://www2.adtran.com/support/technotes/t1ddsadptxvr/
Getting IPCop with the Wanpipe Drivers
The IPCop GPL firewall and router project is in the process of integrating the Sangoma Wanpipe drivers into the standard distribution. However, they don't currently work as of IPCop version 1.4.15.
I have successfully integrated the latest Wanpipe drivers into the IPCop build environment and I have submitted my changes for further testing, modification and inclusion into the project.
For now, I'll make the modified IPCop 1.4.15 installation CD available in our file library.
Example Network

Getting Started
Use the /usr/sbin/wancfg tool to configure the wanpipe interfaces. This is almost self-explanatory.
For a simple point to point T1 application, we use the Cisco HDLC protocol for speed and simplicity.
Here is an example /etc/wanpipe/interfaces/w1g1chdl interface definition for a Sangoma A101 card using CHDLC:
# Wanrouter interface configuration file for IPCop #1
# name: w1g1chdl
# date: Sat May 26 18:31:52 MST 2007
# The IP addresses are arbitrary, but must not interfere
# with the LAN addressing in use
# The IPADDR and POINTOPOINT entries are swapped at either end
DEVICE=w1g1chdl
IPADDR=10.10.10.1
#IPADDR=10.10.10.2 (other end uses this line instead)
NETMASK=255.255.255.255
POINTOPOINT=10.10.10.2
#POINTOPOINT=10.10.10.1 (other end uses this line instead)
ONBOOT=yes
Start the Interfaces and Add the Routes at Boot Time
Edit the /etc/rc.d/rc.local file:
#!/bin/sh
wanrouter start
# Use your _remote_ LAN network address/netmask here route add -net 192.168.2.0 netmask 255.255.255.0 dev w1g1chdl
# You might use this line at the other end
#route add -net 192.168.1.0 netmask 255.255.255.0 dev w1g1chdl
To Configure the Firewall at Boot Time
Edit the /etc/rc.d/rc.firewall.local file:
#!/bin/sh
# Used for private firewall rules
# See how we were called.
case "$1" in
start)
## add your 'start' rules here
/sbin/iptables -I INPUT -i w1g1chdl -j ACCEPT
/sbin/iptables -I FORWARD -i w1g1chdl -j ACCEPT
;;
stop)
## add your 'stop' rules here
/sbin/iptables -D INPUT -i w1g1chdl -j ACCEPT
/sbin/iptables -D FORWARD -i w1g1chdl -j ACCEPT
;;
reload)
$0 stop
$0 start
## add your 'reload' rules here
;;
*)
echo "Usage: $0 {start|stop|reload}"
;;
esac
Changes Made in IPCop Build Environment
This is for documentation purposes only. It will only be useful in the future if the IPCop project does not fix the built-in drivers and I have to fix it myself in the future.
This is the modified lfs/wanpipe file that controls the compilation of the Wanpipe drivers:
###############################################################################
# This file is part of the IPCop Firewall. #
# #
# IPCop is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
# IPCop is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with IPCop; if not, write to the Free Software #
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
# #
# Makefiles are based on LFSMake, which is #
# Copyright (C) 2002 Rod Roard < This e-mail address is being protected from spambots. You need JavaScript enabled to view it > #
# #
# Modifications by: #
# ??-12-2003 Mark Wormgoor < This e-mail address is being protected from spambots. You need JavaScript enabled to view it > #
# - Modified Makefile for IPCop build #
# #
# Sangoma Wanpipe 2.3.3-2 15/03/2006 Andre Newman < This e-mail address is being protected from spambots. You need JavaScript enabled to view it > #
# Based on scripts contributed by Enrique E. Martinez Cardenas #
# #
###############################################################################
###############################################################################
# Definitions
###############################################################################
include Config
VER = 2.3.4-9
THISAPP = wanpipe-$(VER)
DL_FILE = $(THISAPP).tgz
DL_FROM = ftp://ftp.sangoma.com/linux/current_wanpipe
DIR_APP = $(DIR_SRC)/wanpipe
ifeq "$(SMP)" ""
TARGET = $(DIR_INFO)/$(THISAPP)
else
TARGET = $(DIR_INFO)/$(THISAPP)-smp
endif
###############################################################################
# Top-level Rules
###############################################################################
objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = 4bfeecdae79b6991e94aa80b24211b72
install : $(TARGET)
check : $(patsubst %,$(DIR_CHK)/%,$(objects))
download :$(patsubst %,$(DIR_DL)/%,$(objects))
md5 : $(subst %,%_MD5,$(objects))
###############################################################################
# Downloading, checking, md5sum
###############################################################################
$(patsubst %,$(DIR_CHK)/%,$(objects)) :
@$(CHECK)
$(patsubst %,$(DIR_DL)/%,$(objects)) :
@$(LOAD)
$(subst %,%_MD5,$(objects)) :
@$(MD5)
###############################################################################
# Installation Details
###############################################################################
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) && mv $(THISAPP) $(DIR_APP)
# bwm utility won't compile so we delete it from Makefile
cd $(DIR_APP)/util && sed -i '/bwm/d' Makefile
#--force_smp is not better than previous sed hack as if the compilation
# machine use an smp kernel, Setup will warn on the UP kernel build side.
# We should provide appropriate headers for smp and UP to really support
# recompilation of external modules without rebuilding entire corresponding
# kernel before.
# Fix the mouse that dance on the developper keyboard space bar
# suppress option only supported with gcc version >=3.4
cd $(DIR_APP) && sed -i -e 's|fn o-strict-aliasing|fno-strict-aliasing|' \
-e 's|iwithp refix|iwithprefix|' \
-e 's| -fno-unit-at-a-time||' Setup
ifeq "$(SMP)" ""
rm -fr /lib/modules/$(KVER)/kernel/drivers/net/wan/*
rm -fr /lib/modules/$(KVER)/kernel/net/wanrouter/*
cd $(DIR_APP) && ./Setup install \
--silent --arch=i386 \
--with-linux=/usr/src/linux-$(KVER)
find /lib/modules/$(KVER)/ -name '*.o' -a -type f | xargs gzip -nf9
else
rm -fr /lib/modules/$(KVER)-smp/kernel/drivers/net/wan/*
rm -fr /lib/modules/$(KVER)-smp/kernel/net/wanrouter/*
cd $(DIR_APP) && ./Setup install \
--force_smp --silent --arch=i386 \
--with-linux=/usr/src/linux-$(KVER)
find /lib/modules/$(KVER)-smp/ -name '*.o' -a -type f | xargs gzip -nf9
endif
@rm -rf $(DIR_APP)
@$(POSTBUILD)
Edit the src/ROOTFILES.i386 file and comment out bwm:
#usr/sbin/wpbwm
| < Prev | Next > |
|---|





