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


To get the external IP for your PPP session you need a line in the begining of you 
rules set you need a line
to grab the IP address.  Put something like this at the begining of the script (but 
after your ppp
connection comes up):

    externalIP = "`/sbin/ifconfig ppp0 | grep 'inet addr' | awk '{print $2}' | sed -e 
's/.*://'`"

Take careful note of the quotes ( " ), single quotes ( ' ), and apostrophes ( ` ) in 
the text.  All three
are used.  Also, if you are not using a dial up connection (ie if you are using a 
cable modem or DSL
line) replace ppp0 with eth0 or eth1 depending on which is your externally connected 
nic.

If you want to know more about this take a look at the IP Masquerade How To, but this 
should work.

You will need to specify one IP address, unless there is a specific module for the 
game you are trying to
play (what game is it by the way?).  What I do is have a couple of scripts setup on my 
firewall that I use
to turn support for a game on or off.  You could setup a script to open up these ports 
for a particular
address and run it when you need to and then run a script that closes them again when 
you are finished.
Granted this requires a little user interaction on the firewall, but it makes it 
pretty much useable.  The
downside of all this is that you can't have multiple clients playing the same game on 
the internet at the
same time, but if you are on a dialup you probably wouldn't want to do this anyway.

Hope this helps

Dan


Brian Hand wrote:

> Thanks for the reply,
>
> However unless I missed the point, since I have to set an external IP and my 
>provider is DHCP'ing my
> external nic.  How do I know what IP to set it to, especially if the ISP's DHCP 
>server renews my IP?
> Also since I have to specify an internal address.  Can this go the the entire 
>network or do I really have
> to specify one IP address to one machine.  I would really like to do this on 
>multiple machines in my
> network.
>
> Thanks
> Brian
>
> Daniell Freed wrote:
>
> > /* HINT: Search archives @ http://www.indyramp.com/masq/ before posting! */
> >
> > You need to use a utility called ipmasqadm.  Then use these commands.
> >
> > ipmasqadm portfw -a -P tcp -L $externalIP 6667 -R $internalIP 6667
> > ipmasqadm portfw -a -P udp -L $externalIP 6667 -R $internalIP 6667
> > ipmasqadm portfw -a -P tcp -L $externalIP 2300 2400 -R $inernalIP
> > ipmasqadm portfw -a -P udp -L $externalIP 2300 2400 -R $inernalIP
> > ipmasqadm portfw -a -P tcp -L $externalIP 28800 29000 -R $inernalIP
> > ipmasqadm portfw -a -P udp -L $externalIP 28800 29000 -R $inernalIP
> >
> > Hope this helps
> >
> > Dan
> >
> > Brian Hand wrote:
> >
> > > /* HINT: Search archives @ http://www.indyramp.com/masq/ before posting! */
> > >
> > > TWIMC,
> > >
> > > I am trying to get some games working behind my MASQ FW and it requires
> > > the following ports to be let through.
> > >
> > > 6667
> > > 2300-2400
> > > 28800-29000
> > >
> > > I believe both UDP and TCP need to be passed through.  I am not the
> > > worlds great networking guru.  But I implemented ipchains as discussed
> > > in the (older?) HOWTO and I am working fine.  I just need to understand
> > > how to allow the passing thru of these ports.
> > >
> > > Thanks
> > > Brian
> > >
> > > _______________________________________________
> > > 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.
> >
> > --
> > Daniell Freed
> > Computer Services
> > Dewitt, Ross, & Stevens
> >
> > He who fights with monsters might take care
> > lest he thereby become a monster.
> > And if you gaze for long into an abyss,
> > the abyss gazes also into you.
> >
> > Beyond Good and Evil
> > Friedrich Wilhelm Nietzche
> >
> > _______________________________________________
> > 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.

--
Daniell Freed
Computer Services
Dewitt, Ross, & Stevens

He who fights with monsters might take care
lest he thereby become a monster.
And if you gaze for long into an abyss,
the abyss gazes also into you.

Beyond Good and Evil
Friedrich Wilhelm Nietzche

_______________________________________________
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