IP Masquerading: dynamic IP assignment beyond the firewall?

IP Masquerading: dynamic IP assignment beyond the firewall?

Post by Steve Kalla » Sat, 11 Mar 2000 04:00:00



I have been using IP Masquerading for about three months now.  I am running
RedHat 6.1 on an old P 133 machine.  My internet connection is a static IP
address with a DSL modem.  There are two NICs.  One connects to the DSL
modem, the other to a Windows NT machine.  My IP address for the NT machine
behind the firewall is the first Class C address available, 192.168.0.2 with
a gateway of 192.168.0.1.  I plan to add a hub behind the firewall in order
to share the internet with a laptop.  The obvious plan is the assign the
laptop with an IP address of 192.168.0.3.  But on the LAN at work the laptop
will get its address dynamically.  I don't want to constantly be changing
the TCP/IP settings between work and home.  Is there a way with IP
Masquerading to assign IP addresses in this manner.  It will help me a lot.

Thanks in advance,
Steve Kallal

 
 
 

IP Masquerading: dynamic IP assignment beyond the firewall?

Post by Nathan Kleve » Sat, 11 Mar 2000 04:00:00


Are you running Windows 2000 on the laptop by any chance???  If so, you
could just move your PCMCIA NIC from one slot to the other.  Windows 2k will
consider that two different network cards and you can assign two different
IP addresses.  One at home and dynamic at work.

Nate Kleven


> I have been using IP Masquerading for about three months now.  I am
running
> RedHat 6.1 on an old P 133 machine.  My internet connection is a static IP
> address with a DSL modem.  There are two NICs.  One connects to the DSL
> modem, the other to a Windows NT machine.  My IP address for the NT
machine
> behind the firewall is the first Class C address available, 192.168.0.2
with
> a gateway of 192.168.0.1.  I plan to add a hub behind the firewall in
order
> to share the internet with a laptop.  The obvious plan is the assign the
> laptop with an IP address of 192.168.0.3.  But on the LAN at work the
laptop
> will get its address dynamically.  I don't want to constantly be changing
> the TCP/IP settings between work and home.  Is there a way with IP
> Masquerading to assign IP addresses in this manner.  It will help me a
lot.

> Thanks in advance,
> Steve Kallal



 
 
 

IP Masquerading: dynamic IP assignment beyond the firewall?

Post by Chad » Sun, 12 Mar 2000 04:00:00


Why not just setup a DHCP server on the linux box to assign ip addresses to
your other machines.

chad


> I have been using IP Masquerading for about three months now.  I am
running
> RedHat 6.1 on an old P 133 machine.  My internet connection is a static IP
> address with a DSL modem.  There are two NICs.  One connects to the DSL
> modem, the other to a Windows NT machine.  My IP address for the NT
machine
> behind the firewall is the first Class C address available, 192.168.0.2
with
> a gateway of 192.168.0.1.  I plan to add a hub behind the firewall in
order
> to share the internet with a laptop.  The obvious plan is the assign the
> laptop with an IP address of 192.168.0.3.  But on the LAN at work the
laptop
> will get its address dynamically.  I don't want to constantly be changing
> the TCP/IP settings between work and home.  Is there a way with IP
> Masquerading to assign IP addresses in this manner.  It will help me a
lot.

> Thanks in advance,
> Steve Kallal


 
 
 

IP Masquerading: dynamic IP assignment beyond the firewall?

Post by Tad » Sun, 12 Mar 2000 04:00:00


Why not just run dhcpd on your Linux box.

Tad


> I have been using IP Masquerading for about three months now.  I am
running
> RedHat 6.1 on an old P 133 machine.  My internet connection is a static IP
> address with a DSL modem.  There are two NICs.  One connects to the DSL
> modem, the other to a Windows NT machine.  My IP address for the NT
machine
> behind the firewall is the first Class C address available, 192.168.0.2
with
> a gateway of 192.168.0.1.  I plan to add a hub behind the firewall in
order
> to share the internet with a laptop.  The obvious plan is the assign the
> laptop with an IP address of 192.168.0.3.  But on the LAN at work the
laptop
> will get its address dynamically.  I don't want to constantly be changing
> the TCP/IP settings between work and home.  Is there a way with IP
> Masquerading to assign IP addresses in this manner.  It will help me a
lot.

> Thanks in advance,
> Steve Kallal


 
 
 

IP Masquerading: dynamic IP assignment beyond the firewall?

Post by Rod Smi » Sun, 12 Mar 2000 04:00:00


[Posted and mailed]



Quote:> I have been using IP Masquerading for about three months now.  I am running
> RedHat 6.1 on an old P 133 machine.  My internet connection is a static IP
> address with a DSL modem.  There are two NICs.  One connects to the DSL
> modem, the other to a Windows NT machine.  My IP address for the NT machine
> behind the firewall is the first Class C address available, 192.168.0.2 with
> a gateway of 192.168.0.1.  I plan to add a hub behind the firewall in order
> to share the internet with a laptop.  The obvious plan is the assign the
> laptop with an IP address of 192.168.0.3.  But on the LAN at work the laptop
> will get its address dynamically.  I don't want to constantly be changing
> the TCP/IP settings between work and home.  Is there a way with IP
> Masquerading to assign IP addresses in this manner.  It will help me a lot.

The best solution is probably to use DHCP. On the IP masquerading
computer, install and run DHCPD, the DHCP daemon. You could then use an
/etc/dhcpd.conf file that looks something like this:

default-lease-time 6000;
max-lease-time 10000;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
option routers 192.168.0.1;
option domain-name-servers 192.168.0.1;
option domain-name "yourdomain.com";

subnet 192.168.0.0 netmask 255.255.255.0 {
   range 192.168.0.50 192.168.0.75;

Quote:}

host laptop {
   hardware ethernet 00:05:02:a7:76:da;
   fixed-address 192.168.0.3;

Quote:}

You'll need to change a few things, obviously, to fit your specific
network. This configuration gives the laptop a fixed IP address, based on
the MAC address of its Ethernet adapter. (You can do the same for your
existing NT machine.) If you run DNS locally, this is useful because you
can hard-code the machine name in DNS. (If you don't run DNS locally,
you'll need to list your ISP's DNS servers on the "option
domain-name-servers" line.) If you don't have your own registered domain
name, I recommend using something with a fake top-level domain, like
"fakedomain.foo".

On the laptop, configure it to use DHCP. In Windows, I believe this is
called "obtain IP address automatically" or something similar. The result
is that when you plug the computer into your home network, you'll get the
192.168.0.3 address and a suitable machine name, whereas when you plug it
into your work network, you'll get an appropriate IP address and machine
name for that location.

--

http://www.rodsbooks.com
Author of books on Linux networking & WordPerfect for Linux

 
 
 

1. IP Masquerading w/ dynamic IP

Hello out there,

I am using IP Masquerading and an ISP that provides Dynamic IP
Assignment at login. So far, I use a telnet session to my
Masquerade-Server and start up pppd to connect to ISP. I also tried
using diald, but the first packet always goes lost. Is there any
solution to use masq+diald+dynamic IP that would be useable?


Thanks,
Holger

--

WWW         : http://www.erlangen.netsurf.de/dqb539/


2. counting internet traffic on a lan..... with a transparent proxy

3. IP Masquerading over a dynamic IP line?

4. Booting from 2nd HDD

5. Dynamic IP and IP masquerading

6. Printing under Red Hat 4.0 (Colgate)

7. Backup scripts, IP firewalling and IP masquerading

8. /usr/sbin/tcpd

9. Kernel versions, IP firewalls, IP masquerading and stability

10. IP Firewall and IP Masquerading Problems

11. IP for masqueraded net other than masquerading host IP

12. Setting up a dial-up PPP connection w/ dynamic IP assignment

13. Q: Dynamic Assignment of IP Address in PPP