All pastes #86950 Raw Edit

bluevd

public shellscript v1 · immutable
·published 2006-07-13 13:35 UTC
rendered paste body
##Situation:##2 Lans: LanA and LanB;##LanA: internal IP classes: 192.168.2.0/24; 192.168.3.0/24##      metropolitan IP: AAA.AAA.AAA.AAA##      Internet IP: XXX.XXX.XXX.XXX##	Gateway for Internet: YYY.YYY.YYY.YYY##LanB: internal IP class: 192.168.5.0/24##	metropolitan IP: BBB.BBB.BBB.BBB#And now, the setup:##Router from LanAip tunnel add netb mode gre remote BBB.BBB.BBB.BBB local AAA.AAA.AAA.AAA ttl 255ip link set netb upip addr add 192.168.50.2 dev netbroute add -net 192.168.5.0/24 dev netb##Router from LanBip tunnel add netb mode gre remote AAA.AAA.AAA.AAA local BBB.BBB.BBB.BBB ttl 255ip link set netb upip addr add 192.168.50.1 dev netbroute add -net 192.168.2.0/24 dev netbroute add -net 192.168.3.0/24 dev netb##And now, the routing tables:##LanA router#Destination   Gateway         Interface192.168.2.0    0.0.0.0         dev eth1192.168.3.0    0.0.0.0         dev eth1192.168.5.0    0.0.0.0         dev netb192.168.50.0   0.0.0.0         dev netbAAA.AAA.AAA.0  Metro GW        dev eth2XXX.XXX.XXX.0  0.0.0.0         dev eth00.0.0.0        YYY.YYY.YYY.YYY dev eth0##LanB router#Destination   Gateway         Interface192.168.2.0    0.0.0.0         dev netb192.168.3.0    0.0.0.0         dev netb192.168.5.0    0.0.0.0         dev eth1192.168.50.0   0.0.0.0         dev netbBBB.BBB.BBB.0  0.0.0.0         dev eth00.0.0.0        Metro GW        dev eth0## QUESTION:## Using this setup, LanA and LanB can ping eachother and cand transfer various data between lan pc's. But what must I do for computers from LanB to be connected to the internet using the router from LanA? Any sugestions are apreciated =)