Jan 311999
 

Installing an IRC Proxy *

This topic is a work in progress, but feel free to browse the mess.

I decided to install an IRC Proxy in an attempt to get my DCC sessions fully functional.  I’m behind a firewall.

bnc make

The proxy server I’ve decided to install is known as bnc.  As I already had the entire ports tree, here’s what I did to make bnc:
[root@ns:/var/log] # cd /usr/ports/net/bnc/
[root@ns:/usr/ports/net/bnc] # make
>> bnc-web.tar.gz doesn't seem to exist on this system.
>> Attempting to fetch from http://www.bridgenet.net/bnc/.
Receiving bnc-web.tar.gz (22972 bytes): 100%
22972 bytes transfered in 0.7 seconds  (30.81 Kbytes/s)
===>  Extracting for bnc-2.4.3
>> Checksum OK for bnc-web.tar.gz.
===>  Patching for bnc-2.4.3
===>  Applying FreeBSD patches for bnc-2.4.3
===>  Configuring for bnc-2.4.3
creating cache ./config.cache
checking for gcc... cc
checking whether the C compiler (cc -O -pipe ) works... yes
checking whether the C compiler (cc -O -pipe ) is a 
                                                cross-compiler... no
checking whether we are using GNU C... yes
checking whether cc accepts -g... yes
checking how to run the C preprocessor... cc -E
checking for ANSI C header files... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for sys/time.h... yes
checking for unistd.h... yes
checking return type of signal handlers... void
checking for select in -lsocket... no
checking for select in -lnsl... no
checking for select in -linet... no
checking for select in -lcposix... no
checking for select in -lnet... no
checking for snprintf... yes
checking for vsnprintf... yes
updating cache ./config.cache
creating ./config.status
creating Makefile
creating config.h
===>  Building for bnc-2.4.3
gcc -DVERSION='"v2.4.3"' -O6 -c bnc.c
gcc -DVERSION='"v2.4.3"' -O6 -c conf.c
gcc -DVERSION='"v2.4.3"' -O6 -c server.c
gcc -DVERSION='"v2.4.3"' -O6 -c fifo.c
gcc -O6  -o bnc bnc.o conf.o server.o fifo.o
strip bnc
[root@ns:/usr/ports/net/bnc] # make install
===>  Installing for bnc-2.4.3
/bin/cp /usr/ports/net/bnc/work/bnc2.4.3/bnc /usr/local/bin
/bin/cp /usr/ports/net/bnc/work/bnc2.4.3/bncchk /usr/local/bin
/bin/cp /usr/ports/net/bnc/work/bnc2.4.3/example.conf 
                                             /usr/local/etc/bnc.conf
===>   Generating temporary packing list
===>   Registering installation for bnc-2.4.3

Configuring bnc

Please refer to the /usr/ports/net/bnc/work/bnc2.4.3/README file for details on configuring bnc.  Here’s what I decided to do.

I used example.conf as my starting point.

[root@ns:/usr/ports/net/bnc/work/bnc2.4.3] # bnc /etc/bnc.conf 
Irc Proxy v2.4.3 GNU project (C) 1998-99
Coded by Pharos Aka. James Seter :bugs-> (Pharos@DAL.net)
--Using conf file /etc/bnc.conf
--Configuration:
    Daemon port......:6669
    Admin password...:password
    Client password..:-NONE-
    Maxusers.........:0fs
    Default conn port:7000
    Pid File.........:pid.normalusers
    Vhost Default....:bnc.fake.org
    Vhost entry......:maddhatter.org
    Process Id.......:24899
Exit bnc{7} :Successfully went into the background.

Well, that didn’t solve the DCC problem.  Time for a transparent proxy.

transparent proxy

[root@ns:/usr/ports/net] # fetch -P 
                            http://www.scour.org/tircproxy-0.3.0.tar.gz
Receiving tircproxy-0.3.0.tar.gz (20948 bytes): 100%
20948 bytes transfered in 5.4 seconds  (3.81 Kbytes/s)
[root@ns:/usr/ports/net] # tar -xvf tircproxy-0.3.0.tar 
tircproxy/
tircproxy/tircproxy.c
tircproxy/Makefile
tircproxy/README
tircproxy/BUGS
tircproxy/CHANGELOG
tircproxy/COPYING
tircproxy/tircproxy.init
tircproxy/tircproxy-0.3.0.lsm
[root@ns:/usr/ports/net] # cd tircproxy

 

After gettig the more recent port:

[root@ns:/usr/ports/net/tircproxy-0.4] # ./configure
creating cache ./config.cache
checking host system type... i386-unknown-freebsd2.2.8
checking target system type... i386-unknown-freebsd2.2.8
checking build system type... i386-unknown-freebsd2.2.8
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for a BSD compatible install... /usr/bin/install -c
checking for main in -lwrap... no
checking for main in -lnsl... no
checking for main in -lsocket... no
checking for main in -lcrypt... yes
checking for strip... /usr/bin/strip
checking for OS quirks... done.
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for fcntl.h... yes
checking for sys/ioctl.h... yes
checking for sys/time.h... yes
checking for crypt.h... no
checking for syslog.h... yes
checking for unistd.h... yes
checking for netinet/ip_nat.h... no
checking for working const... yes
checking for uid_t in sys/types.h... yes
checking whether gcc needs -traditional... no
checking whether setpgrp takes no argument... no
checking return type of signal handlers... void
checking for select... yes
checking for socket... yes
checking for strerror... yes
checking for strstr... yes
checking for vsnprintf... yes
checking for vprintf... yes
updating cache ./config.cache
creating ./config.status
creating Makefile
creating config.h
[root@ns:/usr/ports/net/tircproxy-0.4] # ee config.h

  4 Responses to “Installing an IRC Proxy *”

  1. It appears that bnc is no longer part of the ports tree. (at least not the one I cvsup’d a week or 2 ago)

    • Where/how were you looking?

      $ cd /usr/ports
      $ make search name=bnc
      Port: bnc-2.8.4
      Path: /usr/ports/irc/bnc
      Info: A simple IRC relay proxy with support for virtual hosting
      Maint: billf@FreeBSD.org
      Index: irc
      B-deps:
      R-deps:

      Port: spambnc-20011013
      Path: /usr/ports/mail/spambnc
      Info: A set of procmail recipies which handle known/suspected spam
      Maint: greid@FreeBSD.org
      Index: mail
      B-deps:
      R-deps:

      Port: obnc-20020222
      Path: /usr/ports/net/obnc
      Info: OpenBSD’s netcat: cleaner code, familiar interface, IPv6 support
      Maint: dd@FreeBSD.org
      Index: net ipv6
      B-deps:
      R-deps:

    • Should have to learn the basics.

  2. i have a problem to solve. my host will come like a router. the internet connection come from utp and then out to another host by serial port. how to do that in freebsd?

    [%sig%]