1 # This is a NAT configuration for a machine on the MediaOne cable network.
4 # MediaOne supplies only one IP address, so all traffic from internal machines
5 # must be proxied. NAT provides the facilities to do this, but getting the
6 # configuration right is a little tricky.
8 # The following is what I use, as of Sat Mar 20 18:50:52 EST 1999. Your milage
14 # ep0 is the external interface (to the MediaOne cable modem).
15 # ep1 is the internal interface (to the local network).
16 # Run `ipf -y' when external address may have changed (from dhclient-script).
18 # Map all internal UDP and TCP traffic to the single external address.
19 # Make sure all the `proxy' lines are before any generic `portmap' lines, as
20 # the first match always wins.
21 map ep0 10.0.0.0/8 -> 0/32 proxy port ftp ftp/tcp
22 map ep0 10.0.0.0/8 -> 0/32 portmap tcp/udp 1024:65535
24 # Map incoming ICMP traffic dynamically.
25 # If you ping from an internal machine, only that machine will see incoming
26 # ICMPs until the mapping times out!
27 map ep0 10.0.0.0/8 -> 0/32
29 # Redirect incoming RealMedia traffic to a specific machine.
30 rdr ep0 0/0 port 7070 -> 10.1.0.2 port 7070 udp
31 rdr ep0 0/0 port 7070 -> 10.1.0.2 port 7070 tcp
33 # Redirect ports for incoming ssh connections.
34 # This requires having multiple keys for the gateway host in your known_hosts
35 # file: one for it and one for each of the machines behind it.
36 # You can use host entries in .ssh/config to create convenient shorthands for
38 rdr ep0 0/0 port 2201 -> 10.1.0.2 port 22 tcp
39 rdr ep0 0/0 port 2202 -> 10.1.0.3 port 22 tcp
40 rdr ep0 0/0 port 2203 -> 10.1.0.4 port 22 tcp
41 rdr ep0 0/0 port 2204 -> 10.1.0.5 port 22 tcp
42 rdr ep0 0/0 port 2205 -> 10.1.0.6 port 22 tcp
43 rdr ep0 0/0 port 2206 -> 10.1.0.7 port 22 tcp
44 rdr ep0 0/0 port 2207 -> 10.1.0.8 port 22 tcp
45 rdr ep0 0/0 port 2208 -> 10.1.0.9 port 22 tcp