Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Jun 2002 13:21:58 -0700 (PDT)
From:      Julian Elischer <julian@elischer.org>
To:        Anthony Volodkin <anthonyv@brainlink.com>
Cc:        freebsd-net@freebsd.org
Subject:   Re: Forwarding UDP packets
Message-ID:  <Pine.BSF.4.21.0206261321130.64758-100000@InterJet.elischer.org>
In-Reply-To: <3D1A1B64.402@brainlink.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Try use mpd
it does proxy arp and handles some broadcast features I believe.



On Wed, 26 Jun 2002, Anthony Volodkin wrote:

> I use poptop+the pppd that is included with 4.6-RELEASE.  On the XP 
> side, my friend just sets up a "Virtual Private Networking Connection" 
> using the native XP client.  
> 
> Here are my /etc/ppp/options, if you wanted protocol info:
> lock
> debug
> auth
> proxyarp
> +chap
> +chapms
> +chapms-v2
> 
> and the relevant portion of ppp.conf:
> pptp:
>  enable chap
>  enable proxy
>  set ifaddr 192.168.1.100 192.168.2.200-192.168.2.205 255.255.255.0
> 
> >what method of doing pptp are you using?
> >
> >
> >On Wed, 26 Jun 2002, Anthony Volodkin wrote:
> >
> >  
> >
> >>Hi,
> >>
> >>Recently I've been faced with an odd problem.  I setup a pptp link to my
> >>network from my friend's XP machine.  While the link functions fine
> >>(both ends can ping each other, etc), there is one problem with it. I
> >>cannot get any broadcast packets through the link.  I receive them on
> >>the tun0 interface, but no matter what I try i can't get them out of the
> >>fxp0 interface.  I cannot get them to go the other way either.  I know
> >>this is against standards, as they suggest routers should not forward
> >>broadcast packets, but I would still like to have this ability.
> >>
> >>Did anyone ever write a patch of some sort or maybe found a tool that
> >>does this type of thing?
> >>(many people suggested natd, and after playing with that i was able to
> >>redirect some bcast packets from tun0 to 1 host on my lan.  I was not
> >>able to do that in the other direction, however.)
> >>
> >>I've found an old post on the hackers list by Jonathan Chen that
> >>included a patch to enable this kind of functionality. I applied it to
> >>my 4.6-RELEASE kernel and it didn't do anything but add a sysctl
> >>variable.  Any help would be greatly appreciated.
> >>
> >>Here is that post:
> >>
> >>---------------------------------------------------
> >>
> >>On FreeBSD -CURRENT and -STABLE, packets to broadcast addresses are not
> >>forwarded.  For instance, if I have a FreeBSD router with interfaces
> >>192.168.1.1 and 192.168.2.1, and I send packets from 192.168.1.2 to
> >>192.168.2.255, the packets are dropped to the floor.  IMO, this is wrong...
> >>but I haven't consulted all the RFC's so I'm not sure if some standard out
> >>there calls for it.  In any case, the following patch creates a sysctl knob
> >>to turn on or off this feature (since it can be considered a security risk
> >>by some).  I just want to ask around in case I turned out to be doing
> >>something incredibly evil.  Comments?
> >>
> >>-Jon
> >>
> >>Index: in.h
> >>===================================================================
> >>RCS file: /export/ncvs/src/sys/netinet/in.h,v
> >>retrieving revision 1.55
> >>diff -u -r1.55 in.h
> >>--- in.h 2001/06/15 00:37:27 1.55
> >>+++ in.h 2001/08/09 15:12:19
> >>@@ -452,7 +452,8 @@
> >>  #define IPCTL_FASTFORWARDING 14 /* use fast IP forwarding code */
> >>  #define IPCTL_KEEPFAITH  15 /* FAITH IPv4->IPv6 translater ctl */
> >>  #define IPCTL_GIF_TTL  16 /* default TTL for gif encap packet */
> >>-#define IPCTL_MAXID  17
> >>+#define IPCTL_FORWARD_BROADCAST 18 /* forward broadcast packets */
> >>+#define IPCTL_MAXID  18
> >>
> >>  #define IPCTL_NAMES { \
> >>   { 0, 0 }, \
> >>Index: ip_input.c
> >>===================================================================
> >>RCS file: /export/ncvs/src/sys/netinet/ip_input.c,v
> >>retrieving revision 1.174
> >>diff -u -r1.174 ip_input.c
> >>--- ip_input.c 2001/06/23 17:17:58 1.174
> >>+++ ip_input.c 2001/08/09 15:33:59
> >>@@ -103,6 +103,10 @@
> >>  SYSCTL_INT(_net_inet_ip, IPCTL_FORWARDING, forwarding, CTLFLAG_RW,
> >>      &ipforwarding, 0, "Enable IP forwarding between interfaces");
> >>
> >>+int ipforward_broadcast = 0;
> >>+SYSCTL_INT(_net_inet_ip, IPCTL_FORWARD_BROADCAST, forward_broadcast,
> >>CTLFLAG_RW,
> >>+    &ipforward_broadcast, 0, "Enable broadcast packets when forwarding
> >>IP packets");
> >>+
> >>  static int ipsendredirects = 1; /* XXX */
> >>  SYSCTL_INT(_net_inet_ip, IPCTL_SENDREDIRECTS, redirect, CTLFLAG_RW,
> >>      &ipsendredirects, 0, "Enable sending IP redirects");
> >>@@ -1684,7 +1688,8 @@
> >>   }
> >>
> >>   error = ip_output(m, (struct mbuf *)0, &ipforward_rt,
> >>-     IP_FORWARDING, 0);
> >>+     IP_FORWARDING|
> >>+     (ipforward_broadcast?IP_ALLOWBROADCAST:0), 0);
> >>   if (error)
> >>    ipstat.ips_cantforward++;
> >>   else {
> >>
> >>
> >>--
> >>Anthony Volodkin
> >>
> >>
> >>To Unsubscribe: send mail to majordomo@FreeBSD.org
> >>with "unsubscribe freebsd-net" in the body of the message
> >>
> >>    
> >>
> >
> >  
> >
> 
> 
> 
> 


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?Pine.BSF.4.21.0206261321130.64758-100000>