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

ipnat and ppp.linkup



Hi,

I can't get ppp.linkup to do "ipnat -CF -f /etc/ipnat.rules" after I 
connect to internet. I have dialup internet (dynamic IP). Here is my  
ppp.conf file:

default:
 set log Phase Chat LCP IPCP CCP tun command
 set device /dev/cua00
 set speed 115200
 set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \"\" AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT"
 allow user username1 username2
 
isp:
 set phone 1234567
 set login
 set authname ispusername
 set authkey isppassword
 set timeout 0
 set redial 3 20
 set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
 add default HISADDR
 enable dns

Here is my ppp.linkup file:

isp:
 !bg ipnat -CF -f /etc/ipnat.rules

(I tried ! sh -c ... too)
I type "ppp isp" and then at the 
ppp ON host> prompt I tupe "dial" to connect to internet and I don't get 
any errors.

That's why I have to do "ipnat -CF -f /etc/ipnat.rules" every time 
manually.
I have enabled ipnat and ipfilter in /etc/rc.conf.
I read the ppp section in the faq, the ppp section in the FreeBSD 
handbook, the ppp section in the FreeBSD faq, and I searched the 
OpenBSD tech and misc mailing lists and I read part of ppp manpage
without being able to find something that might help.
I found this:

http://www.sigmasoft.com/~openbsd/archive/openbsd-misc/200001/msg00382.html

which according to me does not make sense because ppp.linkup executes its 
commands AFTER the connection has been established and besides this ipnat 
command just refreshes the tables.

Btw, my ipnat.rules file:

map tun0 192.168.1.0/24 -> tun0/32 portmap tcp/udp 10000:20000
map tun0 192.168.1.0/24 -> tun0/32

I also tried putting this instead, in my ppp.linkup (even though man ppp says 
that it is no longer needed):
MYADDR:
 delete ALL
 add 0 0 HISADDR
 !bg ipnat -CF -f /etc/ipnat.rules

but it was the same (ipnat -l still didn't show anything).
The computer is running OpenBSD 2.8 release.

Vasil

-- 
<---------------------------------------------------------------------->

For the wages of sin is death, but the gift of God is eternal life in  
Christ Jesus our Lord.
Romans 6:23



Visit your host, monkey.org