Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Collin Baillie <Collin.Baillie@world.net>
To: "'axp-list@redhat.com'" <axp-list@redhat.com>
Subject: Does Tru64 (5.0a) like to talk with linux IPchains / Ipmasqadm po rt forwarding??
Date: Thu, 13 Jun 2002 13:36:18 +1000	[thread overview]
Message-ID: <6416776FCC55D511BC4E0090274EFEF502D44480@EXCHANGE> (raw)

Hi guys,

I'm trying to setup a port forward from my intel linux gateway to my Tru64
5.0a PWS on an internal private IP. As far as I can see, I've got the
ipchains rules correct, the ipmasqadm rules correct, and linux is indeed
doing the port forwarding, but as far as the PWS is concerned it sees
nothing. I *think* (from firewall log output) eth0 is transmitting the IP
address that the packet originated from and Tru64 is ignoring it because it
believes itself to be on a different network. See diagram below.

                          Linux 2.2.19                Tru64 5.0a
 --                      +---------------+           +-----------+
(  )__              Port | Linux gateway |      Port | PWS 600au |
      )__           7777-+---------------+-----> 22  |           |
Internet )---------------| eth1     eth0 |-----------| tu0       |
       --                |     Intel     |           |           |
    __)                  +---------------+           +-----------+
(__)

 External Host    External Int'face  Int Int'face   Single Int'face
ttt.uuu.vvv.www     aaa.bbb.ccc.ddd    10.0.0.1       10.0.0.25


So port 7777 on aaa.bbb.ccc.ddd is set to port-forward to port 22 on
10.0.0.25. 


Example from the firewall log:
------------------------------

Jun 11 15:23:18 gateway kernel: Packet log: input ACCEPT eth1 PROTO=6
ttt.uuu.vvv.www:61226 aaa.bbb.ccc.ddd:5567 L=48 S=0x00 I=50783 F=0x4000
T=118 SYN (#1)
Jun 11 15:23:18 gateway kernel: Packet log: output ACCEPT eth0 PROTO=6
ttt.uuu.vvv.www:61226 10.0.0.25:22 L=48 S=0x00 I=50783 F=0x4000 T=117 SYN
(#2)


Netstat says this:

IP masquerading entries
prot   expire source               destination          ports
tcp   0:58.83 pws600au.local.net   ttt.uuu.vvv.www      ssh -> 61911 (5567)

My firewall script looks like this:

-----schnip-----

#!/bin/sh

_ipchains="/sbin/ipchains"
_ipmasqadm="/usr/sbin/ipmasqadm"
_extip="`/sbin/ifconfig eth1 | grep 'inet addr' | awk '{print $2}' | sed -e
's/.*://'`"
_extif="eth1"

############################################################################
###
#    Setup firewall timeout values
#
${_ipchains} -M -S 3600 10 60

############################################################################
###
#    Flush existing rulesets
#
${_ipchains} -F input
${_ipchains} -F output
${_ipchains} -F forward
${_ipmasqadm} portfw -f

############################################################################
###
#    Setup default forwarding policy to reject. 
#    Add forward policy of MASQ for internal network
#
${_ipchains} -P forward REJECT
${_ipchains} -A forward -s ${_intnet} -j MASQ

############################################################################
###
#   Setup portforwarding to cypress.
#  
${_ipchains} -A input -i ${_extif} -s 0/0 -d 0/0 -j ACCEPT -l
${_ipmasqadm} portfw -a -P tcp -L ${_extip} 5567 -R 10.0.0.25 22

-----schnap-----

All I can think is that I have to use NAT 'cause Tru64 is ignoring the
ttt.uuu.vvv.www IP which is being transmitted on the 10.0.0.0 network..

What do you think????

Collin




                 reply	other threads:[~2002-06-13  3:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox