Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Jan 2006 11:54:00 +0100
From:      "Daniel A." <ldrada@gmail.com>
To:        Igor Robul <igorr@speechpro.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Port forwarding.
Message-ID:  <5ceb5d550601240254x2be85e5eg45355b5e9e7c2cae@mail.gmail.com>
In-Reply-To: <20060124103536.GE15098@sysadm.stc>
References:  <5ceb5d550601232141x74879d8ek38c80c886b28be4a@mail.gmail.com> <20060124103536.GE15098@sysadm.stc>

next in thread | previous in thread | raw e-mail | index | archive | help
Ah, thanks a lot! It finally works!

*Does a happy dance*

All the other guides to ipfilter / ipnat only listed changes to ONE of
the files (either ipf.rules or ipnat.rules), and never mentioned
putting the changes before mapping, even though they did cover that
topic.

On 1/24/06, Igor Robul <igorr@speechpro.com> wrote:
> On Tue, Jan 24, 2006 at 06:41:27AM +0100, Daniel A. wrote:
> > sis0: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
> >         options=3D8<VLAN_MTU>
> >         inet6 fe80::20a:e6ff:fe53:fc1e%sis0 prefixlen 64 scopeid 0x2
> >         inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255
> >         ether 00:0a:e6:53:fc:1e
> >         media: Ethernet autoselect (100baseTX <full-duplex>)
> >         status: active
> > rl0: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
> >         options=3D8<VLAN_MTU>
> >         inet6 fe80::2b0:2ff:fe00:27f3%rl0 prefixlen 64 scopeid 0x3
> >         inet 87.50.69.60 netmask 0xffffff80 broadcast 87.50.69.127
> >         ether 00:b0:02:00:27:f3
> >         media: Ethernet autoselect (100baseTX <full-duplex>)
> >         status: active
> >
> > I have been googling and reading ifconfig papers all day yesterday, in
> > the search for how to do simple port-forwarding, but nothing have
> > worked.
> > So, this is my final resort: How would I forward the ports 9541 (TCP)
> > and 9542 (UDP) to 192.168.0.2 on my LAN?
> /etc/ipnat.conf:
> rdr rl0 0/0 port 9541 -> 192.168.0.2 port 9541 tcp
> rdr rl0 0/0 port 9542 -> 192.168.0.2 port 9542 udp
>
> somewhere on top of file (before "map").
>
> Also you need something like this in your /etc/ipf.rules:
>
> pass in quick on rl0 proto tcp from any to 192.168.0.2/32 port =3D 9541 k=
eep state
> pass in quick on rl0 proto udp from any to 192.168.0.2/32 port =3D 9542 k=
eep state
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.o=
rg"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5ceb5d550601240254x2be85e5eg45355b5e9e7c2cae>