[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] Qube3/Qube2 port forwarding (long)
- Subject: Re: [cobalt-users] Qube3/Qube2 port forwarding (long)
- From: "dr. mikey." <mikey@xxxxxxxxxxxxxxxxx>
- Date: Thu Jul 26 02:22:32 2001
- Organization: biosearch technologies, inc.
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
Alex Barger wrote:
>
> Does anyone know a good way to do port forwarding on a Qube 2 and 3?
> Any ideas welcome.....
>
> I started checking out a program called iportfwd....and tried to install
> from rpm but it said it needs to be version 3 or better or something like
> that, so i wasn't able to do that
not having a qube3 i can't speak to that with any authority, however, it is
my understanding that the qube3 ships with port forwarding built in.
as for the qube2, i (and several others that i know of) have gotten a small
utility called portfwd (http://sourceforge.net/projects/portfwd/) to work
successfully, although it wasn't as easy as just installing the rpm (first
off, the qube2 is mips-based, and all of the available rpm's are for i386
cpus). below are a couple of links (in chronological order) to some of my
previous posts on portfwd, although you should note that the currently
stable version is now 0.21:
http://list.cobalt.com/pipermail/cobalt-users/2000-September/020854.html
http://list.cobalt.com/pipermail/cobalt-users/2000-December/027066.html
http://list.cobalt.com/pipermail/cobalt-users/2001-February/034861.html
btw, you mentioned that you tried something called iportfwd, however i
couldn't find anything by that name on osdn (http://www.osdn.com/), so it
may be that you actually meant the same package that i describe above,
namely portfwd by everton da silva marques. if so, and you were trying to
install the rpm on a qube2, then it didn't work because the rpm was compiled
for an i386 cpu not mips. you will have to download the source and compile
it yourself.
and lastly, below my sig i have included some step by step instructions that
i wrote for another list member who had asked for my help with portfwd. i
have included it here despite its length, because it is from a private email
and therefore does not appear in the archives. please note that i wrote it
for someone who was a very new to linux and the qube2, so i tried to be very
explicit. i was not trying to be condescending.
good luck, and let me know how it goes,
mikey.
--
mike songster work1: www.biosearchtech.com
mikey@xxxxxxxxxxxxxxxxx work2: www.chem.umn.edu/orgs/ampepsoc
had consequence chose differently, had fate its ugly head
my actions make me beautiful and dignify the flesh
r.e.m.
******* instructions for installing portfwd on a qube2 *******
> Any help would be very appreciated.
ok, remember...you can do this! here are some step by step directions:
to get portfwd working on your system, you will need administrative access
to your qube2, if you are not the sys admin for the box, then you will have
to get help from the person who is. you will also need to be able to
transfer files back and forth from your desktop to the qube2 using windows
networking, appleshare, ftp, or ? you will also need to open a command
shell window (telnet or ssh, whichever you use), if you do not have shell
access to your qube2, then i don't think you can do any of this, so go ahead
and proceed to the tossing out of the window option.
*** Step 1: downloading the files ***
so, the first thing you need to do is to download the three files listed
below (and beware in case line wrapping cuts these links):
ftp://ftp.cobaltnet.com/pub/developer/Kernel/mips/All-Kernel_mips-1.0.pkg
ftp://ftp.cobaltnet.com/pub/developer/Kernel/mips/All-Kernel_mips_tools-1.0.pkg
http://prdownloads.sourceforge.net/portfwd/portfwd-0.21.tar.gz
*** Step 2: installing All-Kernel_mips-1.0.pkg ***
once these files are on your desktop we can proceed to install them. the
first one, All-Kernel_mips-1.0.pkg, can be installed directly through the
cobalt gui as follows:
(1) login to the qube's administrative site
(http://your.qubes.domain:81/.cobalt/sysManage/).
(2) select the "Maintenance" option on the lefthand side.
(3) select the "Install Software" option at the top of the page.
(4) check the installed software list at the bottom of the page to be sure
this package hasn't been installed already. if you see "All-Kernel_mips
Release 1.0" in the list, then stop here and proceed to the next section,
skipping steps 5-7.
(5) use the "Browse" button to find the All-Kernel_mips-1.0.pkg, which you
should have downloaded to your desktop.
(6) type in your administrator password.
(7) click the "Install a '.pkg' Package" button.
once the installation has completed, the package name "All-Kernel_mips
Release 1.0" should appear in the installed software list at the bottom of
the screen. you can now proceed to the next section.
*** Step 3: installing All-Kernel_mips_tools-1.0.pkg ***
the next step is to install the "All-Kernel_mips_tools-1.0.pkg" package.
unfortunately, there seems to be a problem with this package file, and you
can't just install it via the gui. you will have to install it manually
using the command shell, but don't worry, it is relatively easy. here's
what you should do:
(1) open your command shell and log into the qube as root (i.e., user id =
root, password = admin password).
(2) change to a reasonable directory where you can manipulate the files
below. i created one in the admin directory called "devel". to do so, type
the following commands (with a return between each command) at the shell
prompt (i.e., "#"):
cd /home/users/admin
mkdir devel
cd devel
(3) transfer the "All-Kernel_mips_tools-1.0.pkg" file from your computer to
the desired directory on the qube (i.e., /home/users/admin/devel). (note:
do to permissions issues on the qube, you may need to copy it first to your
admin directory: "/home/users/admin", then use the command shell to move it
to the "devel" directory using the following 3 commands: "cd
/home/users/admin", "mv All-Kernel_mips_tools-1.0.pkg devel", and "cd
devel")
(4) type the following command at the shell prompt:
tar xvfz All-Kernel_mips_tools-1.0.pkg
(5) change to the RPMS directory using the command: "cd RPMS"
(6) note that there are 16 different rpm files here, these are the
components of All-Kernel_mips_tools-1.0.pkg. you can list the contents of
this directory using the command:
ls -a
(7) you will now need to install each of the 16 component rpms mannually, in
alphabetical order. use the following command (replacing "filename.rpm"
with the actual name of the rpm you are installing, and remember it is case
sensitive):
rpm -U filename.rpm --force --nodeps
once each rpm has been installed (and you can check to be sure they are
installed using the command "rpm -q rpm_name"), you are ready to proceed to
compiling and installing the portfwd program.
*** Step 4: installing portfwd ***
each of the previous packages you installed are required to be able to
compile programs on the qube. now that they are there, you can install the
portfwd utility as follows (this assumes you still have your shell window
open):
(1) transfer the "portfwd-0.21.tar.gz" file from your desktop to the qube
(again, use the devel directory like you did in step 3.3 above).
(2) type the following command at the shell prompt:
tar xvfz portfwd-0.21.tar.gz
(3) change to the newly created portfwd directory using the command:
cd portfwd-0.21
(4) it is probably a good idea to read the readme file located in this
directory (type "less README", when done type "q" to exit less)
(5) change to the src directory using: cd src
(6) you must now edit one of these files before portfwd will compile
correctly on the qube. the file in question is called util.cc, and what you
need to do is change line 100 from "rlim_t fd;" to "int fd;". the following
commands will accomplish this (note: <ctrl> + w means hold down the control
key while typing a "w"):
pico -w util.cc
<ctrl> + w
<ctrl> + t
100
at this point you should be at the line that reads: "rlim_t fd;". if not,
then try typing "<ctrl> + w" followed by "rlim_t fd". now, once you are at
the right place change the line to read "int fd;" and then type "<ctrl> +
x", and respond with a "Y" when it askes you if you want to save your
changes (and do not change the name of the file, i.e., leave it "util.cc").
(7) backup a directory level by typing: "cd .."
(8) compile and install portfwd by typing the following commands:
./configure
make
make install
be aware, that during the compile of portfwd, a wide variety of
informational messages and warning will probably be generated. as long as
it doesn't crap out with an error, you should be fine. after typing the
"make" command, you can check to be sure it compiled correctly by looking in
the "src" directory for a file called "portfwd". this is the compiled
binary for the program. after the last command, the program should be
installed in the "/usr/local/sbin/" directory.
*** Step 5: configuring and starting portfwd ***
now all you have to do is create your config file and start the portfwd
program. what you will need to do is find out which ports you need open and
what the internal ip address is that you want to forward the traffic to. if
you don't already know which ports to use, you can try looking on:
http://www.redhat.com/support/docs/tips/urls/txt/port_numbers.
the config file uses the following syntax:
tcp { 21 { => 192.168.1.1:21 } }
where, the first word "tcp" is the protocol being forwarded (portfwd will
work with tcp or udp). the next part is the port number on the qube that
you want to forward (in this example i used port 21, the ftp port). the
last part is the internal ip address and port where you want the traffic
sent (in our example we are sending traffic to port 21 on the internal ip
192.168.1.1).
once you have created the proper config file for your system, move it to the
same directory where portfwd is installed, i.e., "/usr/local/sbin/")
you can now start portfwd by typing:
/usr/local/sbin/portfwd -c /usr/local/sbin/portfwd.cfg
and bingo, you are done.
***********************************************
and that is i hope the complete step by step instructions for getting
portfwd running on your qube. give it a try, despite the length of this
email and your lack of linux experience, it really isn't that hard. i was
able to do it after all, and i'm not even a trained computer geek (i'm
actually a chemist who is handy with computers).
do let me know how it goes and i will certainly help with any problems that
may arise with these instructions if i can.