PDA

View Full Version : port forwarding


dns
January 7th, 2011, 17:55
Hello. How i can redirect connections from lo0 with port 80 to wlan0
My default internet interface is fxp0.
I need using port 80 from wlan0 internet.

SirDice
January 7th, 2011, 18:20
Your question doesn't make sense, please elaborate.

dns
January 7th, 2011, 18:50
Ok, i need redirect out traffic (http/80) to wlan0/192.168.1.1 (ADSL)!
For all other ports i using internet from fxp0.
This is, thanks

vand777
January 8th, 2011, 23:56
Packet Filter (PF) (http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/firewalls-pf.html)

http://www.freebsd.org/cgi/man.cgi?query=pf.conf&sektion=5&apropos=0&manpath=FreeBSD+8.1-RELEASE

Some time ago the OpenBSD PF FAQ (http://www.openbsd.org/faq/pf/index.html) helped me to learn PF. Unfortunately, the difference in syntax between PF on FreeBSD 8.x and PF on OpenBSD 4.8 has become bigger and this FAQ will not help you a lot now :-( AFAIK, FreeBSD 8.x uses quite old version of PF - from OpenBSD 4.1.

vand777
January 9th, 2011, 00:08
Another solution might be IPFW (http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/firewalls-ipfw.html). Look at fwd.

http://www.freebsd.org/cgi/man.cgi?query=ipfw&apropos=0&sektion=0&manpath=FreeBSD+8.1-RELEASE&format=html

Please note that typical mistake is that people often forget about the following:
To enable fwd a custom kernel needs to be compiled with the option options IPFIREWALL_FORWARD.