Wrong ip from $4 within ip-up.local

Wrong ip from $4 within ip-up.local

Post by YML-HK-EDP/Wilson La » Sun, 31 Dec 1899 09:00:00



Hi Everybody,

I have setup a gateway in a remote site using diald to
connect to local isp on demand and making use of the
ip address from the isp to fire up ipfwadm rules to let
remote users access the internet. Once the ppp0 is up
the I email back the ip-address-from the isp to me.

I obtained isp-allocated ip address within ip-up.local by
$4 and make use of if to setup ipfwadm commands.

"Most of the time" it works but "sometimes" the ip address
from $4 is the local-host's ip and ipfwadm rules do not
work as what I expected.

I have extended the up-delay from 5 to 10 seconds, but still
cannot solve the problem.

Anybody has any suggestions?

Information:
Using: Linux 2.0.36 Redhat 5.2
           diald 0.16.5-201
           pppd 2.3 patch level 5
           ipfwadm 2.3.0-6

Wilson Lam

 
 
 

Wrong ip from $4 within ip-up.local

Post by James Carlso » Sun, 31 Dec 1899 09:00:00



> "Most of the time" it works but "sometimes" the ip address
> from $4 is the local-host's ip and ipfwadm rules do not
> work as what I expected.

What are your pppd options and what logs do you see when the problem
occurs?

Are you specifying "noipdefault"?  If the peer is supplying your
address in all cases, then this should be used.

--

IronBridge Networks / 55 Hayden Avenue   71.246W   Vox:  +1 781 372 8132
Lexington MA  02421-7996 / USA           42.423N   Fax:  +1 781 372 8090
"PPP Design and Debugging" --- http://people.ne.mediaone.net/carlson/ppp

 
 
 

1. IP Masquerading works, but does not masquerade from within the local network

I've got a box running Redhat 6.1 working as a gateway for our home network.
It's connected to a cable modem, and we've only got one IP address, so it's
doing IP forwarding and masquerading for us.

Now, consider this situation: I've got a webcam running on one of my windows
boxes, whose IP address is 192.168.0.1 (for instance). The webcam is on port
8888, and I've got the linux box set up to forward this port along from
port, say, 9999, using a line much like

ipmasqadm portfw -a -P tcp -L xxx.xxx.xxx.xxx 9999 -R 192.168.0.1 8888

in my rc.local.

This works very well for people connecting in from outside - they'd use a
URL like:

http://xxx.xxx.xxx.xxx:9999/video/frame

but if I try and use that URL from inside the local network, it doesn't
connect, I'd have to use:

http://192.168.0.1:8888/video/frame

which is rather annoying as it makes it difficult to test things (I have to
VNC out to work and boot up a browser there)

I'm fairly sure the problem isn't with the webcam software - I've had the
same problem when trying to connected to an apache server inside the network
as well.

any ideas?

cheers,

Tim


2. XF86 config/setup fields for new monitor and card. HELP!!

3. can't ping, netstat -nr shows wrong local-ip

4. Samba + MS LanMan Enhance problem!

5. wrong local ip number for ppp0 interface

6. rm "-S"

7. Working ip-up, ip-down, ip-up-dialer !!

8. cdrom audio (vaio sr7k)

9. Want to have Local IP the same as router IP

10. I NEED A LOCAL IP CHECKER TO SEND THE IP TO AN OUTSIDE ACCOUNT!

11. incoming IP packet with local interface's IP as origin?

12. local IP vs. "internet IP" (socket question)

13. IP Masquerade Question: Local Access to Server on Ext. IP