It is in fact not hard at all:
Example:
NOWIP=`getifaddr eth1`
/sbin/ipmasqadm portfw -a -P tcp -L $NOWIP 25 -R 10.1.4.2 25
Since DHCP get's renewed only when you logon to a DHCP server the NOWIP
variable will be correct all the time.
I am currently going through a lot of scripts and put my own flavour to it.
I have little experience with bastille-firewall scripting and have to learn
how to implement it all correctly.
Than again, I am not a real developper anyway.... ;-)
The above is from my Coyote router script.
Now I have to quickly learn how to do it with ipvsadm.
Did you have problems getting an IP address?
I am using cable 'service' from Rogers@Home and had to add this to the
ifcfg-eth1 template:
DHCP_HOSTNAME=$Eth1Hostname" if ($Eth1Hostname =~ /\S+/);
and run the config-wrapper.pl -u function to implement it.
Now it is working, let me know where you stand with the forwarding. That
way I can move the Cooker in front of my services and use the squid proxy.
Kind regards,
Aldert van der Laan
London, Ontario
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Ron Heron
Sent: March 19, 2001 3:30 PM
To: [EMAIL PROTECTED]
Subject: Re: [Cooker-firewall] Port forwarding
>
> Port forwarding works actually only for static external Interface.
>
I have a dynamic IP. Why does it only work for static external
interfaces? It seems it would be quite easy to hook a script to the
network service to grep for new IP and restart the portforwarding
services, right? At least that's what I had to do.
Ron
=====
^C
quit
:q
exit
?
help
shit
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/