/* HINT: Search archives @ http://www.indyramp.com/masq/ before posting! */


My understanding of the $IP_REAL variable is that it should be set to the
IP on the "outside" of your network, or that which the ISP assigns to you.

This might be a relative hassle, seeing that you use ppp (it's less than
enjoyable to redo your 'routing' every time you connect). However, i think
we'll be alright if you put this in your ppp-on script or however people
do it nowadays.

IP_REAL=`ifconfig |grep -A 1 ppp0 |tail -1 | cut --delimiter=":" -f 2 |cut 
--delimiter=" " -f 1`

ipmasqadm portfw -f
ipmasqadm portfw -a -P tcp -L $IP_REAL 51210 -R 192.168.0.2 51210
ipmasqadm portfw -a -P upd -L $IP_REAL 51201 -R 192.168.0.2 51201
ipmasqadm portfw -a -P upd -L $IP_REAL 51200 -R 192.168.0.2 51200
ipmasqadm portfw -ln

By putting this in your ppp script (hopefully after the section where you
dialup and gain your IP), it will flush the 'old' ruleset and modify the
routes to reflect your new IP.

note:

I'd venture to say that my multiple fork-having pipe-maze isn't the most
efficient way of doing things, but since we're only running 3 iterations
of it, it is of little import.

good luck, 

aaron pratt - [EMAIL PROTECTED] - [EMAIL PROTECTED]


> /* HINT: Search archives @ http://www.indyramp.com/masq/ before posting! */
> 
> 
> Hi:)
> 
> has any one been able to get dialpad to work correctly?
> 
> if so please email me or the list. I am having trouble hearing people back
> when I call. I installed the rpm for ipmasqadm.
> 
> 
> Following is the listing for my rc.local...please be kind and don't mess up
> my machine by hacking:) :
> ___________________________________________
> 
> #!/bin/sh
> 
> # This script will be executed *after* all the other init scripts.
> # You can put your own initialization stuff in here if you don't
> # want to do the full Sys V style init stuff.
> 
> if [ -f /etc/redhat-release ]; then
>     R=$(cat /etc/redhat-release)
> 
>     arch=$(uname -m)
>     a="a"
>     case "_$arch" in
>           _a*) a="an";;
>           _i*) a="an";;
>     esac
> 
>     # This will overwrite /etc/issue at every boot.  So, make any changes you
>     # want to make to /etc/issue here or you will lose them when you reboot.
>     echo "" > /etc/issue
>     echo "$R" >> /etc/issue
>     echo "Kernel $(uname -r) on $a $(uname -m)" >> /etc/issue
> 
>     cp -f /etc/issue /etc/issue.net
>     echo >> /etc/issue
> fi
> 
> 
> 
> #dynip.pl  > /dev/null &
> /bin/cat /root/empty | lpr
> # /mnt/apps/firedoor/firedoor -d -l /var/log/firedoor
> 
> ipchains -P forward DENY
> ipchains -A forward -s 192.168.0.2/24 -j MASQ
> 
> #ipchains -P forward  DENY
> #ipchains -A forward -i ppp0 -j MASQ
> #echo 1 > /proc/sys/net/ipv4/ip_forward
> 
> modprobe ip_masq_ftp
> modprobe ip_masq_irc
> 
> # auto forward method:
> 
> # /usr/sbin/ipmasqadm autofw -A -v -r udp 51200 51201 -c tcp 7175
> # /usr/sbin/ipmasqadm autofw -A -v -r tcp 51210 51210 -c tcp 7175
> #/usr/sbin/ipmasqadm autofw -A -v -r udp 53
> 
> 
> 
> # dialpad to 1 pc one local masq net ( add to /etc/rc.d/rc.local)
> IP_REAL="192.168.0.1"
> TOIP_PC="192.168.0.2"
> ipmasqadm portfw -f
> ipmasqadm portfw -a -P tcp -L $IP_REAL 51210 -R $TOIP_PC 51210 
> ipmasqadm portfw -a -P upd -L $IP_REAL 51201 -R $TOIP_PC 51201 
> ipmasqadm portfw -a -P upd -L $IP_REAL 51200 -R $TOIP_PC 51200 
> ipmasqadm portfw -ln 
> 
> 
> ipmasqadm portfw -a -P upd -L $IP_REAL 53 -R $TOIP_PC 53 # this is for icq
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> *************************************************
> ****Tahir is a Citizen of the Republic of Perl***
> *************************************************
> *********Don't let your friends do DOS:)*********
> *************************************************
> 
> _______________________________________________
> Masq maillist  -  [EMAIL PROTECTED]
> Admin requests can be handled at http://www.indyramp.com/masq-list/ -- THIS INCLUDES 
>UNSUBSCRIBING!
> or email to [EMAIL PROTECTED]
> 
> PLEASE read the HOWTO and search the archives before posting.
> You can start your search at http://www.indyramp.com/masq/
> Please keep general linux/unix/pc/internet questions off the list.

_______________________________________________
Masq maillist  -  [EMAIL PROTECTED]
Admin requests can be handled at http://www.indyramp.com/masq-list/ -- THIS INCLUDES 
UNSUBSCRIBING!
or email to [EMAIL PROTECTED]

PLEASE read the HOWTO and search the archives before posting.
You can start your search at http://www.indyramp.com/masq/
Please keep general linux/unix/pc/internet questions off the list.

Reply via email to