[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

ipportfw problem



hi,

this might be an off-the-topic on this list but i hope no one would flame
me for this.  i just need to throw this question and hope that somebody
out here would give me an answer.

i am currently testing a voip setup in a masq'd environment.  here's a
draft of the setup:

            phone
              |
           voip gw
              |
       masq'ding server
         _____|______
         |    |     |
       stn1 stn2 stn3


in my current ipmasq script, i have hardcoded the ip address of the masqd
client but that restricts me to use only one client in running the voip
program.  the ideal setup shld allow me to use any of the masqd clients.
my question now is how could the masqd'ing server det. what client
initiates a call and what port is it using which is needed in the portfw
table.

i presume that this script would not be a one-time-run script but rather a
background program ready to alter the portfw table when needed.

here's a part of my ipmasq script: 
===== 

/sbin/ipchains -A forward -s 192.168.0.0/25 -j MASQ
 
 
## to do: 
## determine the masq'd client that initiates the call and pass the  value to $my_ip
##  determine the port being used and pass it to $my_port

my_port=20000 
my_ip=192.168.0.100
 
while [ $my_port -lt 25000 ] do
  /usr/sbin/ipmasqadm portfw -a -P udp -L 202.134.224.1 $my_port -R $my_ip
$my_port
  my_port=$((my_port+1)) done
   
======

THANKS!



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]