[nos-bbs] AMPRnet Routing
Raymond Quinn
w6ray at sbcglobal.net
Sat May 8 21:49:32 EDT 2010
I am still having an issue with the 44Network routing. The BBS is reachable
via the Internet and packets are reaching the ports using the 44Net address
(using tcpdump), but they get no further. One time the address used for a
port check showed up as "logging in" to JNOS.
Here is what I have:
Public IP address, which is the gateway address, on the Linux side.
71.130.72.53. I have 44.2.10.208/29 and am using 44.2.10.209 as the IP
address the BBS. I have tried using all 44Net addresses and all sorts of
configurations. So far, this one has worked the best, but only on the
Internet side. What needs to be done to also work within the AMPR Net?
# Ethernet
#==========================
attach tun tun0 1500 0
pause 1
ifconfig tun0 ipaddress 192.168.1.201 # JNOS LAN Address
ifconfig tun0 netmask 255.255.255.0
ifconfig tun0 mtu 1500
pause 1
#
shell /sbin/ifconfig tun0 71.130.72.53 pointopoint 192.168.1.201 mtu 1500 up
shell /sbin/ifconfig tunl0 44.2.10.209 up
pause 5
shell /sbin/arp -s 192.168.1.201 00:11:43:b9:70:1a pub
#
## This is a test for routing...
shell echo 1 >/proc/sys/net/ipv4/ip_forward
shell iptables -t nat -A POSTROUTING -o eth0 -s 192.168.1.201 -j MASQUERADE
pause 2
# Encap
#========================
ifconfig encap ipaddress 44.2.10.209
ifconfig encap netmask 255.255.255.255
ifconfig encap broadcast 255.255.255.255
ifconfig:
eth0 Link encap:Ethernet HWaddr 00:11:43:B9:70:1A
inet addr:71.130.72.53 Bcast:71.130.72.63 Mask:255.255.255.240
inet6 addr: fe80::211:43ff:feb9:701a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:45567 errors:0 dropped:0 overruns:0 frame:0
TX packets:11949 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4968330 (4.7 MiB) TX bytes:2071774 (1.9 MiB)
Interrupt:169
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:5409 errors:0 dropped:0 overruns:0 frame:0
TX packets:5409 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4765863 (4.5 MiB) TX bytes:4765863 (4.5 MiB)
tun0 Link encap:UNSPEC HWaddr
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:71.130.72.53 P-t-P:192.168.1.201 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:453 errors:0 dropped:0 overruns:0 frame:0
TX packets:446 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:30302 (29.5 KiB) TX bytes:27232 (26.5 KiB)
tunl0 Link encap:IPIP Tunnel HWaddr
inet addr:44.2.10.209 Mask:255.0.0.0
UP RUNNING NOARP MTU:1480 Metric:1
RX packets:61313 errors:0 dropped:0 overruns:0 frame:0
TX packets:530 errors:894 dropped:0 overruns:0 carrier:0
collisions:894 txqueuelen:0
RX bytes:27526294 (26.2 MiB) TX bytes:71710 (70.0 KiB)
virbr0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:53 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:10262 (10.0 KiB)
tcpdump -vv -i tunl0 when doing a check on port 23:
18:36:33.780012 IP (tos 0x0, ttl 44, id 57967, offset 0, flags [DF], proto:
TCP (6), length: 60) ro10042.plusserver.de.36779 > w6ray.ampr.org.telnet: S,
cksum 0x7b44 (correct), 4042100797:4042100797(0) win 5840 <mss
1460,sackOK,timestamp 1351774802 0,nop,wscale 2>
18:36:36.774317 IP (tos 0x0, ttl 44, id 57969, offset 0, flags [DF], proto:
TCP (6), length: 60) ro10042.plusserver.de.36779 > w6ray.ampr.org.telnet: S,
cksum 0x6f8c (correct), 4042100797:4042100797(0) win 5840 <mss
1460,sackOK,timestamp 1351777802 0,nop,wscale 2>l
tcpdump -vv tun0 on incoming axudp:
18:40:34.916913 IP (tos 0x0, ttl 234, id 293, offset 0, flags [none], proto:
UDP (17), length: 45) c-98-238-147-85.hsd1.ca.comcast.net.dcp > sjvbbs.dcp:
[udp sum ok] UDP, length 17
18:40:34.917024 IP (tos 0x0, ttl 224, id 490, offset 0, flags [none], proto:
UDP (17), length: 45) sjvbbs.dcp > c-98-238-147-85.hsd1.ca.comcast.net.dcp:
[udp sum ok] UDP, length 17
18:40:35.007321 IP (tos 0x0, ttl 234, id 294, offset 0, flags [none], proto:
UDP (17), length: 81) c-98-238-147-85.hsd1.ca.comcast.net.dcp > sjvbbs.dcp:
UDP, length 53
18:40:36.053050 IP (tos 0x0, ttl 224, id 491, offset 0, flags [none], proto:
UDP (17), length: 67) sjvbbs.dcp > c-98-238-147-85.hsd1.ca.comcast.net.dcp:
[udp sum ok] UDP, length 39
18:40:36.053089 IP (tos 0x0, ttl 224, id 492, offset 0, flags [none], proto:
UDP (17), length: 170) sjvbbs.dcp > c-98-238-147-85.hsd1.ca.comcast.net.dcp:
UDP, length 142
This works with the IPTABLES entries:
*nat
:OUTPUT ACCEPT XX
:PREROUTING ACCEPT XX
:POSTROUTING ACCEPT XX
-A PREROUTING -i eth0 -d 71.130.72.53 -p tcp --dport 4 -j DNAT --to
192.168.1.201:4
-A PREROUTING -i eth0 -d 71.130.72.53 -p udp --dport 4 -j DNAT --to
192.168.1.201:4
-A PREROUTING -i eth0 -d 71.130.72.53 -p tcp --dport 21 -j DNAT --to
192.168.1.201:21
-A PREROUTING -i eth0 -d 71.130.72.53 -p tcp --dport 23 -j DNAT --to
192.168.1.201:23
...
... etc.
COMMIT
I could use some help with this. I have checked the archives on the 44net
and nos-bbs lists and have tried everything I have found with no luck. It is
likely that I don't fully understand what it is I am trying to do...
73 de Ray Quinn W6RAY
Visalia, CA DM06
SJVBBS w6ray.ampr.org
More information about the nos-bbs
mailing list