[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Road Runner and IP Masquerading

> I have setup something similar to this yes.  I was having a bit of trouble
> finding the correct nat rule.  It is easiest to have dhcp assign you an ip
> then to give your machine that ip statically then change it every few
> weeks.  RRs dhcp server atleast in my area likes to expire its lease very
> often and every time it does it kills my routing table.  Also if you need
> it in your area I can send the slightly modified source for rrlogind.

My address is pretty static(only had it change when I changed ether cards)so I
add the following rule to ipnat.rules:

map ep0 -> my.road.runner.address/32

If you are using ISC dhcp(AFAIK wide doesn't work so you probably are)then you
should be able to add some code to dhclient-script (usually in /usr/local/sbin)
that will create /etc/ipnat.rules when you get an address. Something like:

set internal_network_address= # or whatever
set internal_mask_number=24
set mask_number=32

if [ x$new_ip_address != x ] && [ x$internal_network_address != x ] && \
   [ x$mask_number != x] && [ x$internal_mask_number != x]; then

	echo "map $interface $internal_network_address/$internal_mask_number \
-> $new_ip_address/$mask_number" > /etc/ipnat.rules

	# start ipnat here, or mroe likeely start DHCP before
	# ipnat in /etc/netstart
Trevor R.H. Clarke
Computer Science House
Rochester Institute of Technology      Scientific Programmer for CIS
retrev_(_at_)_csh_(_dot_)_rit_(_dot_)_edu                     trcpci_(_at_)_cis_(_dot_)_rit_(_dot_)_edu