Greetings Brian,
On Tue, 21 Feb 2012, Brian Kantor wrote:
Does anyone have a step-by-step set of instructions
for configuring a
Linux host as a tunnel subnet gateway for AMPRNet?
I'd like to have a proven list of all the commands that have to be
entered to set one up.
I think it would be very helpful and I don't have such a document in
my archives.
Here is the snippett from the /NOS/AUTOEXEC.NOS where it sets up the
TUN0 interface. Below that, I show the output of IFCONFIG and ROUTE on
the Linux box, for your reference.
In this example, 192.168.0.5 is the address of the Linux
ethernet card and 192.168.0.44 is the address of the JNOS application
running on Linux. BOTH address "appear" to exist on your LAN as if they
were two independent machines.
# --------------------------
# - TUN0 Configuration -
# --------------------------
# NOTE: Remember to turn on IPv4 Forwarding in the kernel !!!!
# echo 1 > /proc/sys/net/ipv4/ip_forward
#
attach tun tun0 1500 0
#
# Whenever any host on your ethernet sends an ARP asking "Who-Has
# 192.168.0.44", the ethernet in the Linux box will respond that it knows
# how to reach this address. This 'feature' negates the need to assign an
# Alias address to the Linux box's Eth0 interface (eth0:44), nor the need
# to put anything special in the Linux route table :)
#
ifconfig tun0 ipaddress 192.168.0.44
ifconfig tun0 netmask 255.255.255.0
ifconfig tun0 mtu 1500
ifconfig tun0 description "TUN0 to Ethernet"
#
shell ifconfig tun0 192.168.0.5 pointopoint 192.168.0.44 mtu 1500 up
#
# Shouldn't be any need to ARP on a Point-to-Point link
# so this has been commented out.
# Note: The MAC addr would be that of the Linux eth card
##shell arp -s 192.168.0.44 00:11:43:c4:b3:48 pub
#
echo ***** TUN0 Configuration Complete *****
pause 2
#
#
All done!
# ifconfig
eth0 Link encap:Ethernet HWaddr 00:11:43:c4:b3:48
inet addr:192.168.0.5 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::211:43ff:fec4:b348/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:60 errors:0 dropped:0 overruns:0 frame:0
TX packets:54 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:14669 (14.3 KB) TX bytes:7099 (6.9 KB)
Interrupt:16
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:192.168.0.5 P-t-P:192.168.0.44 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:7 errors:0 dropped:0 overruns:0 frame:0
TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:392 (392.0 B) TX bytes:526 (526.0 B)
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.6 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 192.168.0.1 0.0.0.0 UG 100 0 0 eth0
On your gateway router remember to port forward (to 192.168.0.44)
Telnet, Finger, and any other 'services' you want to reach on your JNOS
application from the Internet. I do *not* recomend forwarding SMTP unless
you have a solid way to prevent spam from the public Internet getting out
onto your RF network.
If your JNOS application is running the ENCAP.TXT route table and uses
the 'encap' interface, DO NOT PORT FORWARD ANYTHING! Instead, define the
192.168.0.5 ip address of the JNOS application as your "DMZ Host" so that
ALL protocols (TCP, IPIP Protocol-4, and others) will be automatically
routed to the JNOS application where JNOS'es 'ip access' and 'tcp
access'
firewall rules will decide what gets through for processing/routing.
Hope this helps!
--- Jay Nugent WB8TKL
o Chair, ARRL Michigan Section "Digital Radio Group" (DRG)
[
www.MI-DRG.org]
() ascii ribbon campaign in
/\ support of plain text e-mail
+------------------------------------------------------------------------+
| Jay Nugent jjn(a)nuge.com (734)484-5105 (734)649-0850/Cell |
| Nugent Telecommunications [
www.nuge.com] |
| Internet Consulting/Linux SysAdmin/Engineering & Design/ISP Reseller |
| ISP Monitoring [
www.ispmonitor.org] ISP & Modem Performance Monitoring |
| Web-Pegasus [
www.webpegasus.com] Web Hosting/DNS Hosting/Shell Accts|
+------------------------------------------------------------------------+
02:01:01 up 170 days, 8:39, 3 users, load average: 0.07, 0.14, 0.06