1*0Sstevel@tonic-gate#!/sbin/ipnat -f - 2*0Sstevel@tonic-gate# 3*0Sstevel@tonic-gate# THIS EXAMPLE IS WRITTEN FOR IP FILTER 3.3 4*0Sstevel@tonic-gate# 5*0Sstevel@tonic-gate# ppp0 - (external) PPP connection to ISP, address a.b.c.d/32 6*0Sstevel@tonic-gate# 7*0Sstevel@tonic-gate# ed0 - (internal) network interface, address w.x.y.z/32 8*0Sstevel@tonic-gate# 9*0Sstevel@tonic-gate# If we have only 1 valid IP address from our ISP, then we do this: 10*0Sstevel@tonic-gate# 11*0Sstevel@tonic-gate# To make ftp work, using the internal ftp proxy, use: 12*0Sstevel@tonic-gate# 13*0Sstevel@tonic-gatemap ppp0 w.x.y.z/24 -> a.b.c.d/32 proxy port ftp ftp/tcp 14*0Sstevel@tonic-gate# 15*0Sstevel@tonic-gate# For normal TCP/UDP and other IP protocols 16*0Sstevel@tonic-gate# 17*0Sstevel@tonic-gatemap ppp0 w.x.y.z/24 -> a.b.c.d/32 portmap tcp/udp 40000:60000 18*0Sstevel@tonic-gatemap ppp0 w.x.y.z/24 -> a.b.c.d/32 19*0Sstevel@tonic-gate# 20*0Sstevel@tonic-gate# if we get a different dialup IP address each time, then we would use: 21*0Sstevel@tonic-gate# 22*0Sstevel@tonic-gate#map ppp0 w.x.y.z/24 -> 0/32 portmap tcp/udp 40000:60000 23*0Sstevel@tonic-gate#map ppp0 w.x.y.z/24 -> 0/32 24*0Sstevel@tonic-gate# 25*0Sstevel@tonic-gate# If we have a class C address space of valid IP#'s from our ISP, then we can 26*0Sstevel@tonic-gate# do this: 27*0Sstevel@tonic-gate# 28*0Sstevel@tonic-gate#map ppp0 w.x.y.z/24 -> a.b.c.d/24 portmap tcp/udp 40000:60000 29*0Sstevel@tonic-gate#map ppp0 w.x.y.z/24 -> a.b.c.d/24 30*0Sstevel@tonic-gate# 31*0Sstevel@tonic-gate# or, if we only have a small number of PC's, this: 32*0Sstevel@tonic-gate# 33*0Sstevel@tonic-gate#map ppp0 w.x.y.v/32 -> a.b.c.E/32 portmap tcp/udp 40000:60000 34*0Sstevel@tonic-gate#map ppp0 w.x.y.v/32 -> a.b.c.E/32 35*0Sstevel@tonic-gate#map ppp0 w.x.y.u/32 -> a.b.c.F/32 portmap tcp/udp 40000:60000 36*0Sstevel@tonic-gate#map ppp0 w.x.y.u/32 -> a.b.c.F/32 37*0Sstevel@tonic-gate#map ppp0 w.x.y.t/32 -> a.b.c.G/32 portmap tcp/udp 40000:60000 38*0Sstevel@tonic-gate#map ppp0 w.x.y.t/32 -> a.b.c.G/32 39*0Sstevel@tonic-gate#map ppp0 w.x.y.s/32 -> a.b.c.H/32 portmap tcp/udp 40000:60000 40*0Sstevel@tonic-gate#map ppp0 w.x.y.s/32 -> a.b.c.H/32 41*0Sstevel@tonic-gate#map ppp0 w.x.y.r/32 -> a.b.c.I/32 portmap tcp/udp 40000:60000 42*0Sstevel@tonic-gate#map ppp0 w.x.y.r/32 -> a.b.c.I/32 43*0Sstevel@tonic-gate#map ppp0 w.x.y.q/32 -> a.b.c.J/32 portmap tcp/udp 40000:60000 44*0Sstevel@tonic-gate#map ppp0 w.x.y.q/32 -> a.b.c.J/32 45*0Sstevel@tonic-gate#map ppp0 w.x.y.p/32 -> a.b.c.K/32 portmap tcp/udp 40000:60000 46*0Sstevel@tonic-gate#map ppp0 w.x.y.p/32 -> a.b.c.K/32 47