Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Feb 2001 05:48:02 -0800
From:      Julian Elischer <julian@elischer.org>
To:        Juha Lindstrom <juha@toolbox.yok.utu.fi>
Cc:        freebsd-net@freebsd.org
Subject:   Re: gateway/proxy arp
Message-ID:  <3A9A5E92.A9837700@elischer.org>
References:  <Pine.BSF.4.21.0102261452190.6716-100000@toolbox.yok.utu.fi>

next in thread | previous in thread | raw e-mail | index | archive | help
Juha Lindstrom wrote:
> 
> Hi!
> 
> I have a somewhat tricky situation with a gateway/proxy arp setup. Let me
> quickly tell you some backgrounds:
> 
> 1) I'm connected to internet via university LAN
> 2) university only allows one MAC address to communicate with the outside
> world at a time, thus I can not use a HUB
> 3) I have 2 real IP addresses which I want to assing to 2 different
> computers, one for fbsd and one for windows
> 
> Ok, I'm new to fbsd but I have used slackware linux earlier and managed to
> get this system to work in the following way:
> 
> 1) setup eth0 to communicate with outside world using DHCP to get the
> necessary info
> 2) ifconfig eth1 (=interface to connect with windows) 192.168.1.1 up
> 3) arp -i eth0 -s <windows IP> <windows machine MAC> pub
> 4) route add <windows IP> metric 1 dev eth1
> 
> Now, I managed to get those commands to work with fbsd with one exception
> - the ARP comman. Seems that fbsd doesn't allow me to specify the
> interface like it does in the linux implemation. And this results in
> windows discovering another computer using it's MAC address and then
> shutting down network.
> 
> So, the question is - how would I accomplish this in fbsd? Please, give as
> detailed information as you possibly can since I'm new to fbsd.

use natd

# man 8 natd

NATD(8)                 FreeBSD System Manager's Manual                NATD(8)

NAME
     natd - Network Address Translation Daemon

SYNOPSIS
     natd [-unregistered_only | -u] [-log | -l] [-proxy_only] [-reverse]
          [-deny_incoming | -d] [-use_sockets | -s] [-same_ports | -m]
          [-verbose | -v] [-dynamic] [-in_port | -i port]
          [-out_port | -o port] [-port | -p port]
          [-alias_address | -a address] [-target_address | -t address]
          [-interface | -n interface] [-proxy_rule proxyspec]
          [-redirect_port linkspec] [-redirect_proto linkspec]
          [-redirect_address linkspec] [-config | -f configfile] [-log_denied]
          [-log_facility facility_name] [-punch_fw firewall_range]

DESCRIPTION
     This program provides a Network Address Translation facility for use with
     divert(4) sockets under FreeBSD.  It is intended for use with NICs - if
     you want to do NAT on a PPP link, use the -nat switch to ppp(8).

     The natd normally runs in the background as a daemon.  It is passed raw
     IP packets as they travel into and out of the machine, and will possibly
     change these before re-injecting them back into the IP packet stream.
[...]

everything will appear to come from the one (freeBSD) machine.

> 
> Thank you in advance
> 
> Juha
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-net" in the body of the message

-- 
      __--_|\  Julian Elischer
     /       \ julian@elischer.org
    (   OZ    ) World tour 2000-2001
---> X_.---._/  
            v

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3A9A5E92.A9837700>