I got the idea to setup a tunneled network configuartion from
NET-3-HOWTO Section 6.13. Here is my network setup:
192.168.1/24 192.168.2/24
- -
| eth1 = ppp0 = |
| aaa.bbb.ccc.2 aaa.bbb.ccc.1 fff.ggg.hhh.iii |
| |
| /-----\ /-----\ /-----\ |
| | | | | // | | |
|---| A |---------------| H |---------//---------| B |---|
| | | | | // | | |
| \-----/ \-----/ \-----/ |
| |
- -
A ... Linux server at work
B ... My personal Linux server (dialup with dynamic IPs).
H ... HUB = Gateway for A (Dont know the internals of this hardware)
Linux router `A' is configured with:
#
PATH=/sbin:/usr/sbin
#
# Ethernet configuration
# eth1
ifconfig eth1 aaa.bbb.ccc.2 netmask 255.255.255.0 broadcast aaa.bbb.ccc.255 up
route add -net aaa.bbb.ccc.0 netmask 255.255.255.0 eth1
route add default gw aaa.bbb.ccc.1 metric 1 eth1
# eth0
ifconfig eth0 192.168.1.1 netmask 255.255.255.0 up
route add -net 192.168.1.0 netmask 255.255.255.0 eth0
# Cause all hosts on the 192.168.1/24 network to be masqueraded.
ipfwadm -F -p deny
ipfwadm -F -a m -S 192.168.1.0/24 -D 0.0.0.0/0
#!/bin/sh
# This script will be executed (using ssh) after my ppp0 interface at B
# is configured. The first parameter is the local IP of my ppp0 interface.
# Tunnel device configuration
ifconfig tunl0 192.168.1.1 up
route add -net 192.168.2.0 netmask 255.255.255.0 gw $1 tunl0
Linux router `B' would be configured with:
#
PATH=/sbin:/usr/sbin
#
# Ethernet configuration
ifconfig eth0 192.168.2.1 netmask 255.255.255.0 up
route add -net 192.168.2.0 netmask 255.255.255.0 eth0
# This is part of my /etc/ppp/ip-up script:
# Tunnel device configuration
ifconfig tunl0 192.168.2.1 up
route add -net 192.168.1.0 netmask 255.255.255.0 gw aaa.bbb.ccc.2 tunl0
I tried to ping from A and B, but it does not work:
A>ping 192.168.2.1
B>ping 192.168.1.1
What is wrong with my idea ???
Ulrich
--
o------------------------------------------------o
Ulrich Leodolter
University of Vienna, Institute of Psychology
o------------------------------------------------o