At 06:55 PM 12.28.2002 +0000, Matthew Seaman wrote:
>On Sat, Dec 28, 2002 at 11:09:12AM -0600, Jack L. Stone wrote:
>> I've looked for a good set of working examples of packeting forwarding
>> using ipfw, but no luck yet. I'm wondering if the following rule would work
>> for sending packets received on the gateway to a machine on the internal
>> network (LAN)...???
>> # ipfw add fwd tcp from to <port#>
>Err... you need an IP number and possibly a port number after the
>'fwd', which is what the 'next hop' address is set to for packets that
>match the rest of the line:
>    ipfw add fwd tcp from to port
>Note that the packet itself isn't rewritten at all, so you will have
>to put in place something on the destination machine to accept
>packets destined the original address.
>       Cheers,
>       Matthew

I want the packets to remain intact, but delivered correctly. I'm not even
sure if this is the right direction to take to solve the problem. Perhaps
an explanation of the delimma:

I have a FBSD gateway (with NAT & caching DNS) on a server and the public
interface identifies incoming packets and routes them to the proper machine
using IP aliases in the interface -- fairly typical I suppose as per
example as follows, with rl0 as the internal and rl1 as external interfaces:

ifconfig_rl0="inet netmask 0xffffff00"
ifconfig_rl1="inet 123.45.678.001 netmask"
ifconfig_rl1_alias0="inet 123.45.678.002 netmask"
ifconfig_rl1_alias1="inet 123.45.678.003 netmask"
etc, etc.....

Then, I use NAT to do redirect from above external IPs to machines on
private network.
-redirect_address 123.45.678.002
-redirect_address 123.45.678.003
etc, etc.....

Any emails sent (via Sendmail) out of machine leaves and goes
to the gateway, resolves itself as 123.45.678.003 just fine and goes OUT
for delivery. BUT, the gateway machine (or any other machine on the private
network) cannot find its way to that machine fro deliver of emails. Any
mails coming from the outside enteres the gateway and is sent to the
machine 123.45.678.003/ just fine... just not from within the
LAN.... they must know also know the IP to get there. The above
-redirects does not do it for INTERNAL emails. This is only a problem where
copies of emails sent OUT contain copies to go BACK to internal machines --
such as majordomo mail lists.

To try to make it simpler, any mails that leave an internal machine must go
to the default gateway, and then gets confused and cannot find
its way back to that same machine to deliver copies of emails.

This has GOT to have a simple solution and typical problem..... then I
thought of using the forwarding. Ouch, hurts my head just trying to explain

Sorry for the length of this.....

Best regards,
Jack L. Stone,

SageOne Net

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to