🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cu.slug
Article #99

Re: IP Masquerade

#99
From: Christopher R. Barry
Date: Fri, 09 Jul 1999 00:00
90 lines
3767 bytes
Jong-won Choi <lispm@hanmail.net> writes:

> Hi,
> 
> Is it possible to make a Genera 8.3(MacIvory) IP masquerading gateway(or
> should I write one)?
> 
> I have only one IP address with a MacIvory and Linux boxes(LAN). And
> want to connect the MacIvory to the Internet, also to make others are
> enable to access the Internet.
> 
> Any procedures, tips, helps?

Make the Linux box your IP-masq gateway. I recently got my XL1201
connected to the net via IP Masquerading through a Linux gateway.

For the Lispm side add these services to your Linux host:

  Service: DOMAIN TCP DOMAIN
  Service: GATEWAY IP INTERNET-GATEWAY

Then set this attribute for your Site object:

  Root Domain Server Address: INTERNET AAA.BBB.CCC.DDD

Fill in the address for above with your ISP's nameserver address. (I'm
not sure how to do the secondary nameserver.)

Now comes the fun part from the Linux side. This only applies to 2.2.x
series kernels which use ipchains instead of ipfwadm. You need to
compile all the IP-masq stuff into your kernel first. This part of my
kernel .config looks like:

  #
  # Networking options
  #
  CONFIG_PACKET=y
  CONFIG_NETLINK=y
  CONFIG_RTNETLINK=y
  # CONFIG_NETLINK_DEV is not set
  CONFIG_FIREWALL=y
  # CONFIG_FILTER is not set
  CONFIG_UNIX=y
  CONFIG_INET=y
  # CONFIG_IP_MULTICAST is not set
  # CONFIG_IP_ADVANCED_ROUTER is not set
  # CONFIG_IP_PNP is not set
  CONFIG_IP_FIREWALL=y
  # CONFIG_IP_FIREWALL_NETLINK is not set
  CONFIG_IP_ALWAYS_DEFRAG=y
  # CONFIG_IP_TRANSPARENT_PROXY is not set
  CONFIG_IP_MASQUERADE=y

  #
  # Protocol-specific masquerading support will be built as modules.
  #
  CONFIG_IP_MASQUERADE_ICMP=y

Next you need to enable IP forwarding. As root, do:

  echo "1" > /proc/sys/net/ipv4/ip_forward

Finally, set up the ipchains rules:

  ipchains -P forward DENY
  ipchains -A forward -s 192.168.0.0/24 -j MASQ

The above address should be your network's address and the number
after the slash should be 8 if it's class A, 16 if it's class B or 24
if it's class C.

After you do this stuff try telneting from the LispM to somewhere on
the net and if it works then add the above stuff into your network
initialization scripts. (/etc/init.d/network for Debian Linux.)

Also, if you want to use Zmail from the Lispm then add services SEND,
MAIL-TO-USER and possibly STORE-AND-FORWARD-MAIL over medium/protocol
TCP/SMTP. I haven't figured out how to do newsgroups via NNTP from the
Lispm (is there a way?) but it should be possible to set up the Linux
box as a news server and then set it up to recieve and forward news
from the Lispm over another protocol like SMTP.

Finally, the sender domain addresses in your emails from Zmail will
look like cbarry@[192.168.0.2] and after spending much time looking at
the Zmail docs for a way to fix this I think the only way is to set
your host's Internet Domain Name attribute to your ISP's. (I haven't
gotten around to trying this yet....) Until you do this most of your
emails will bounce do to spam protection.

Christopher
Technical Details
Message-ID: <931500655.8185@news.Colorado.EDU>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <37855646.89C6A02B@hanmail.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10077e,5736f3f7bd5f4569
X-Google-Attributes: gid10077e,public
From: cbarry@2xtreme.net (Christopher R. Barry)
Subject: Re: IP Masquerade
Date: 1999/07/09
Message-ID: <931500655.8185@news.Colorado.EDU>
X-Deja-AN: 498989318
Distribution: cu
Sender: daemon@peabody.colorado.edu
References: <37855646.89C6A02B@hanmail.net>
X-Note1: message-id generated by recnews
X-Note2: mail msgid was   <87yagq1hgj.fsf@2xtreme.net>
X-Face: $DD[\LKdx&F)[@v9:I8![L"O*X#'|ctq-w]1aoQD8x1:^PQG@d*UK?JldK53q
Organization: University of Colorado at Boulder
Newsgroups: cu.slug
NNTP-Posting-User: daemon