131183Speter#!/sbin/ipnat -f -
231183Speter#
353024Sguido# THIS EXAMPLE IS WRITTEN FOR IP FILTER 3.3
431183Speter#
531183Speter# ppp0 - (external) PPP connection to ISP, address a.b.c.d/32
631183Speter#
731183Speter# ed0 - (internal) network interface, address w.x.y.z/32
831183Speter#
931183Speter# If we have only 1 valid IP address from our ISP, then we do this:
1031183Speter#
1167615Sdarrenr# To make ftp work, using the internal ftp proxy, use:
1267615Sdarrenr#
1367615Sdarrenrmap ppp0 w.x.y.z/24 -> a.b.c.d/32 proxy port ftp ftp/tcp
1467615Sdarrenr#
1567615Sdarrenr# For normal TCP/UDP and other IP protocols
1667615Sdarrenr#
1731183Spetermap ppp0 w.x.y.z/24 -> a.b.c.d/32 portmap tcp/udp 40000:60000
1831183Spetermap ppp0 w.x.y.z/24 -> a.b.c.d/32
1931183Speter#
2031183Speter# if we get a different dialup IP address each time, then we would use:
2131183Speter#
2231183Speter#map ppp0 w.x.y.z/24 -> 0/32 portmap tcp/udp 40000:60000
2331183Speter#map ppp0 w.x.y.z/24 -> 0/32
2431183Speter#
2531183Speter# If we have a class C address space of valid IP#'s from our ISP, then we can
2631183Speter# do this:
2731183Speter#
2831183Speter#map ppp0 w.x.y.z/24 -> a.b.c.d/24 portmap tcp/udp 40000:60000
2931183Speter#map ppp0 w.x.y.z/24 -> a.b.c.d/24
3031183Speter#
3131183Speter# or, if we only have a small number of PC's, this:
3231183Speter#
3331183Speter#map ppp0 w.x.y.v/32 -> a.b.c.E/32 portmap tcp/udp 40000:60000
3431183Speter#map ppp0 w.x.y.v/32 -> a.b.c.E/32
3531183Speter#map ppp0 w.x.y.u/32 -> a.b.c.F/32 portmap tcp/udp 40000:60000
3631183Speter#map ppp0 w.x.y.u/32 -> a.b.c.F/32
3731183Speter#map ppp0 w.x.y.t/32 -> a.b.c.G/32 portmap tcp/udp 40000:60000
3831183Speter#map ppp0 w.x.y.t/32 -> a.b.c.G/32
3931183Speter#map ppp0 w.x.y.s/32 -> a.b.c.H/32 portmap tcp/udp 40000:60000
4031183Speter#map ppp0 w.x.y.s/32 -> a.b.c.H/32
4131183Speter#map ppp0 w.x.y.r/32 -> a.b.c.I/32 portmap tcp/udp 40000:60000
4231183Speter#map ppp0 w.x.y.r/32 -> a.b.c.I/32
4331183Speter#map ppp0 w.x.y.q/32 -> a.b.c.J/32 portmap tcp/udp 40000:60000
4431183Speter#map ppp0 w.x.y.q/32 -> a.b.c.J/32
4531183Speter#map ppp0 w.x.y.p/32 -> a.b.c.K/32 portmap tcp/udp 40000:60000
4631183Speter#map ppp0 w.x.y.p/32 -> a.b.c.K/32
47