[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: MOL<-->Linux file transfer




"Andrew E. Clark" wrote:
> 
> Martin et al.,
> 
> Is there any trick to setting up IP masquerading & keeping the main,
> fixed, IP address simultaneously??

I am not quite sure if I understand your question. I have one address
that is visible from the exterior and is used by linux. It is not
completely fixed, but dynamically attributed by dhcp. This one does not
change. The IP masquerading is for MOL. It is done with the same
ethernet card by using the alias eth0:1. 

Here is what I did. It was very simple after I found an older message
where someone gave precise and correct instructions for this, see the
URL below. What took me the most time was to recompile the kernel with
all the right config options necessary for IP masquerading. In addition
to that, I just created a file "/sbin/ifup-local" which starts the
interface eth0:1 automatically at boot time or also when I say "ifup
eth0". Below is the file.

Enjoy.
--
Martin
 
costabel[1] more /sbin/ifup-local
#!/bin/bash

if [ "foo$1" != "fooeth0" ]
then
    exit
fi

# From
http://www.hotwired.com/webmonkey/99/30/index3a_page5.html?tw=backend
# ip_forward on one ethernet card: second device on eth0:1

echo 1 > /proc/sys/net/ipv4/ip_forward
/sbin/ifconfig eth0:1 192.168.1.1 netmask 255.255.255.0 arp broadcast
192.168.1.255
/sbin/ipchains -P forward DENY
/sbin/ipchains -A forward -s 192.168.1.0/255.255.255.0 -j MASQ
# If you telnet a lot, this will stop your connections from timing out
at
# inconvenient times.
/sbin/ipchains -M -S 7200 10 60  

# Configuring client systems is simple. Your default gateway should be 
# 192.168.1.1, which is the address assigned to the second network card 
# on the Linux machine. Subnet mask is
# 255.255.255.0, and nameservice is your ISP's nameserver 
# (or your local nameserver if you have one)