LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   IP Forwarding (https://www.linuxquestions.org/questions/linux-networking-3/ip-forwarding-28251/)

gballard 08-19-2002 10:23 AM

IP Forwarding
 
I am currently running a RedHat 7.3 with kernel 2.4.18-3 using Firestarter as my firewall and NAT. I was told that it is possible to get the video and voice chat features of Yahoo Messenger to work properly using portforwarding. He sent me the ports I need to forward to make this work. Problem is...I have no idea how to forward the ports. I see a reference to ipmasqadm but when i do a locate on this on my box...it doesn't seem to be installed. Is there a RPM for it? I didn't see it on my cds and when I went to http://rpmfind.net I didn't find one expressly for redhat 7.3. Here is what he said I needed to put in my rc.local:

ipmasqadm portfw -a -P udp -L 24.x.x.x.x 2090 -R 192.168.0.6 2090

ipmasqadm portfw -a -P udp -L 24.x.x.x.x 2091 -R 192.168.0.6 2091

The 24.x.x.x is apparently his static IP address on his linux box. I don't have a static IP address....I am on dialup and my IP changes everytime...what would I put in for that in my case?

Any information or pointing me to documentation on this would be greatly appreciated.

johntmills 08-19-2002 11:43 AM

You could fix this by adding a little code to your dialer script or just run it
manually after you connect. Here's the script I use for my cable modem
since it changes a couple of times a year:

NIC=`route -n | grep UG | awk {'print $8'}`
IP=`ifconfig $NIC | grep "inet addr" | awk -F: {'print $2'} | awk {'print $1'}`

ipmasqadm portfw -a -P udp -L $IP 2090 -R 192.168.0.6 2090
ipmasqadm portfw -a -P udp -L $IP 2091 -R 192.168.0.6 2091

I haven't worked very much with modems, but I think you should just have
a device called ppp0 or some such. The NIC command will just determine
what your default gateway is on, and then it uses ifconfig to determine the
IP. Another way of doing this is checking your DHCP file because it also
knows your IP.

-John

gballard 08-19-2002 12:33 PM

I have done some reading and it seems that ipmasqadm is for the 2.2 kernel and I am using the 2.4 kernel....should I be using something else to do the port forwarding for the 2.4 kernel?

Sylhouette 08-19-2002 02:37 PM

You need iptables with the 2.4 kernel


All times are GMT -5. The time now is 05:49 AM.