From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from concerto.rednote.net ([66.92.170.139]) by speech.braille.uwo.ca with esmtp (Exim 3.36 #1 (Debian)) id 1EhHD7-0000z6-00 for ; Tue, 29 Nov 2005 20:56:41 -0500 Received: from concerto.rednote.net (localhost.localdomain [127.0.0.1]) by concerto.rednote.net (8.13.4/8.13.4) with ESMTP id jAU1t8jr021323 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 29 Nov 2005 20:55:08 -0500 Received: (from janina@localhost) by concerto.rednote.net (8.13.4/8.13.4/Submit) id jAU1t89A021322 for speakup@braille.uwo.ca; Tue, 29 Nov 2005 20:55:08 -0500 Date: Tue, 29 Nov 2005 20:55:08 -0500 From: Janina Sajka To: "Speakup is a screen review system for Linux." Message-ID: <20051130015508.GD5268@rednote.net> References: <20051129031149.GI23546@rednote.net> <000201c5f49b$3b0d1af0$6901a8c0@QUARK> <20051129132437.GJ23546@rednote.net> <20051129173949.GA3085@bookpc.earthlink.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051129173949.GA3085@bookpc.earthlink.net> User-Agent: Mutt/1.4.2.1i X-Operating-System: Linux concerto.rednote.net 2.6.14-1.1637_FC4spksmp Organization: Capital Accessibility LLC (http://www.CapitalAccessibility.com) X-PGP-Key: http://www.CapitalAccessibility.com/JaninaSajka_gpg_key.html Subject: Re: Routing Multiple Inbound IP Addresses -- How? X-BeenThere: speakup@braille.uwo.ca X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "Speakup is a screen review system for Linux." List-Id: "Speakup is a screen review system for Linux." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2005 01:56:41 -0000 OK. So, I tried this, with my correct addresses, of course. It didn't work. Only one service port was showing on an nmap. Attempts to ssh to one machine got a "refused." Attempts to go to another just sat there with no responce. I Ctrl-C'd out. In the iptables rules I note that there are rules to accept responses for anything that originated on the inside. Do I maybe need similar rules for packets that originated on the outside via these addresses? In order that the response can be forwarded back out over the Internet? Gregory Nowak writes: > Ok, I think I see what you're going for. > > In the below examples, I assume that you have an external ip, 1.2.3.4, > which you want to route to 192.168.0.1, and a second external ip, > 5.6.7.8, that you want to route to 192.168.0.2. I also assume that > your network device connected to the dsl modem is eth0. > > iptables -t nat -A PREROUTING -i eth0 --source 1.2.3.4 -j DNAT > --to-destination 192.168.0.1 > > and > > iptables -t nat -A PREROUTING -i eth0 --source 5.6.7.8 -j DNAT > --to-destination 192.168.0.2 > > Note 1:, I know I'm using incorrect number ranges for the external ip > addresses. > > Note 2: This might have line wrapped, so be sure to check for that if > doing cut and paste. > > Note 3: I obviously haven't tested this, but it should work in theory, > as far as I understand iptables syntax. If you get errors, let me or > the list know, and I'll try to resolve them. Hth. > > Greg