LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices



Reply
 
Search this Thread
Old 02-23-2003, 11:11 AM   #1
Ratclaws
Member
 
Registered: Sep 2001
Location: New York
Distribution: Slackware 8
Posts: 100

Rep: Reputation: 16
Angry port forwarding / redirection


FreeBSD 4.7

I know we've all seen this a million times, buy damnit! i still cant get it working.
I am trying to forward a port on my firewall to an inside box that is running apache.
ex.
inet > modem > Firewall > - 192.168.1.x.

heres the set up.

------------------------------------
kernel was compiled with :

options IPFIREWALL
options IPDIVERT
options IPFIREWALL_VERBOSE
options IPFIREWALL_FORWARD
options IPFILTER
options IPFILTER_LOG
options IPFIREWALL_VERBOSE_LIMIT=100
options IPFIREWALL_DEFAULT_TO_ACCEPT
options MROUTING
-------------------------------------------------

--------------------
/etc/natd.conf :

interface rl0
--------------------------------------------------



--------------------
/etc/rc.ipfw :

ipfw -f flush
ipfw add divert natd all from any to any via rl0
ipfw add pass all from any to any
-----------------------------------------------------



--------------------
/etc/rc.conf (snippit)


firewall_enable="YES"
firewall_script="/etc/rc.ipfw"
natd_program="/sbin/natd"
natd_enable="YES"
natd_interface="rl0"
natd_flags="-f /etc/natd.conf"
----------------------------------------



So far everything works exactly as it should. All computers on the LAN can access the net. The problem is when I try to forward port 80 to one of the hosts on the lan. What is the correct way to do this?
 
Old 02-23-2003, 11:13 AM   #2
Ratclaws
Member
 
Registered: Sep 2001
Location: New York
Distribution: Slackware 8
Posts: 100

Original Poster
Rep: Reputation: 16
in case you need it for some reason

rl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
inet6 fe80::248:54ff:fe88:6db8%rl0 prefixlen 64 scopeid 0x1
inet 216.179.XX.XXX netmask 0xffffff00 broadcast 216.179.75.255
ether 00:48:54:88:6d:b8
media: Ethernet autoselect (10baseT/UTP)
status: active
rl1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet 192.168.1.2 netmask 0xffffff00 broadcast 192.168.1.255
inet6 fe80::248:54ff:fe8c:dae9%rl1 prefixlen 64 scopeid 0x2
ether 00:48:54:8c:da:e9
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
IPCHAINS port forwarding and IPTABLES port forwarding ediestajr Linux - Networking 26 01-14-2007 08:35 PM
Simple Port Forwarding Firewall - not forwarding MadTurki Linux - Security 14 04-09-2006 01:08 PM
Port 80 redirection omlex Linux - Security 1 02-20-2005 04:22 PM
Port Redirection JonChristmas Linux - Networking 1 09-04-2004 04:19 AM
VNC port redirection sqn Linux - Networking 5 11-18-2003 10:38 PM


All times are GMT -5. The time now is 12:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration