[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Serial port tunnel...



On Thu, Oct 05, 2000 at 02:07:13PM +0100, Max Lock wrote:
> Robert Waldner wrote:
> > 
> > I guess you want to tunnel layer 2, not the serial port itself ;-)
> 
>  Nope, I really want to tunnel the port, I want to have
> /dev/virtual-ttyS1 and be able to open that device and read/write to it.
> then have that data tunneled across a network to the real /dev/ttyS1 on
> the remote machine.

this probably isn't what you want, is it?
(probably not, but the best way to find out is to find out...)

	#!/bin/sh
	DEV=secret

	INSIDE_HERE=192.168.1.1
	INSIDE_THERE=192.168.0.1

	OUTSIDE_HERE=321.1.2.3
	OUTSIDE_THERE=789.4.5.6

	#######################################################
	# three little commands do all the work
	#

	# create new device
	ip tunnel add $DEV \
		local $OUTSIDE_HERE \
		remote $OUTSIDE_THERE \
		mode gre

	# set it up to talk between these two points (with network on far end)
	ifconfig $DEV $INSIDE_HERE pointopoint $INSIDE_THERE \
	 	netmask 255.255.255.0

	# now re-establish our firewall rules to include the new gadget
	ipmasq

	#
	# all done. that's it. go home. see ya. bye now.
	#######################################################

% ip tunnel show
secret: gre/ip  remote 789.4.5.6  local 321.1.2.3  ttl 255

we tested this with two windows 98 boxes for 'network neighborhood'
remote volume mounts and all was peachy: 192.168.1.200 accessed
192.168.0.2 like a charm.

components definitely required for this are:
	modconf -> ipv4 modules -> ip_gre / ipip
		(tho i only use 'mode gre' in "ip tunnel" above)
	apt-get install netbase <-- i think this is by default
		- /etc/network/interfaces, ifup, ifdown
		- ipchains (firewall)
		- inetd
		- ping
	apt-get install ipmasq
		- forwarding & masquerading
	apt-get install iproute
		- for the "ip tunnel" facility
and they're all stable/potato, no woody needed.

i have reecently seen some kind of port-forwarding gizmo, tho...

-- 
things are more like they used to be than they are now.

will@serensoft.com *** http://www.dontUthink.com/



Reply to: