Networking Forums

Networking Forums > Computer Networking > Linux Networking > How to bind an IP to a variable (firewall)

Reply
Thread Tools Display Modes

How to bind an IP to a variable (firewall)

 
 
circuit_breaker
Guest
Posts: n/a

 
      04-12-2004, 01:51 PM
Hi,

In my rc.firewall file, I have something like this:

INET_IP="XXX.XXX.XXX.XXX"
INET_IFACE="eth0"

I would like to assign INET_IP the IP address given by my ISP.
How?

Thanks.
 
Reply With Quote
 
 
 
 
David Efflandt
Guest
Posts: n/a

 
      04-12-2004, 06:27 PM
On 12 Apr 2004, circuit_breaker <(E-Mail Removed)> wrote:
> Hi,
>
> In my rc.firewall file, I have something like this:
>
> INET_IP="XXX.XXX.XXX.XXX"
> INET_IFACE="eth0"
>
> I would like to assign INET_IP the IP address given by my ISP.
> How?


Since you are on cable modem and likely get an IP via dhcp, see man pages
or docs for whatever dhcp client you are using (dhcpcd or pump?). It
should have a method to run a script whenever you get a new IP, and you
can either set something in a file or refresh your firewall from there
(or pass it to your firewall script as a command line parameter).

--
David Efflandt - All spam ignored http://www.de-srv.com/
 
Reply With Quote
 
James Knott
Guest
Posts: n/a

 
      04-12-2004, 10:26 PM
circuit_breaker wrote:

> Hi,
>
> In my rc.firewall file, I have something like this:
>
> INET_IP="XXX.XXX.XXX.XXX"
> INET_IFACE="eth0"
>
> I would like to assign INET_IP the IP address given by my ISP.
> How?
>
> Thanks.


1) You don't have to filter on your IP.

2) The assigned IP should be available in a file stored by the dhcp client.

--

Fundamentalism is fundamentally wrong.

To reply to this message, replace everything to the left of "@" with
james.knott.
 
Reply With Quote
 
Christoph Scheurer
Guest
Posts: n/a

 
      04-13-2004, 06:41 PM
On 12 Apr 2004 06:51:19 -0700
(E-Mail Removed) (circuit_breaker) wrote:

> Hi,
>
> In my rc.firewall file, I have something like this:
>
> INET_IP="XXX.XXX.XXX.XXX"
> INET_IFACE="eth0"
>
> I would like to assign INET_IP the IP address given by my ISP.
> How?
>
> Thanks.


INET_IP=`ifconfig eth0 | awk -F' ' '/inet addr/ {print $2}' - | sed -e 's/.*:\(.*\)/\1/'`

Greets
Chris
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
(sky) ADSL variable speeds Ric Home Networking 6 12-18-2008 03:24 PM
Variable signal David W Allen Home Networking 0 04-05-2006 07:35 PM
Variable I/P address Paul Aitman Home Networking 14 12-06-2005 03:00 PM
The variable bit cpu Skybuck Flying Windows Networking 0 07-30-2005 07:04 PM
Variable IP question zjustice Broadband 3 06-02-2005 11:00 PM



1 2 3 4 5 6 7 8 9 10 11