User login

Poll

Window manager/desktop favorit?
KDE
10%
Gnome
45%
XFCE
30%
Enlightenment
0%
Blackbox, Fluxbox
15%
Windowmaker
0%
Altceva
0%
Total votes: 20

Partners

[banner]

[banner]

[banner]

Port forwarding

Mai oameni buni, va rog din suflet spuneti-mi si mie cum sa combin ipfw si natd astfel incat sa fac functional un web server ascuns in spatele router-ului.Dar va rog sa fie mai mura-n gura ca sunt prost rau de tot!

Port forwarding

natd manual

-redirect_port proto targetIP:targetPORT[-targetPORT]
		 [aliasIP:]aliasPORT[-aliasPORT]
		 [remoteIP[:remotePORT[-remotePORT]]]
		 Redirect incoming connections arriving to given port(s) to
		 another host and port(s).  Argument proto is either tcp or
		 udp, targetIP is the desired target IP address, targetPORT is
		 the desired target port number or range, aliasPORT is the
		 requested port number or range, and aliasIP is the aliasing
		 address.  Arguments remoteIP and remotePORT can be used to
		 specify the connection more accurately if necessary.  If
		 remotePORT is not specified, it is assumed to be all ports.

		 Arguments targetIP, aliasIP and remoteIP can be given as IP
		 addresses or as hostnames.  The targetPORT, aliasPORT and
		 remotePORT ranges need not be the same numerically, but must
		 have the same size.  When targetPORT, aliasPORT or remotePORT
		 specifies a singular value (not a range), it can be given as
		 a service name that is searched for in the services(5) data-
		 base.

		 For example, the argument

		       tcp inside1:telnet 6666

		 means that incoming TCP packets destined for port 6666 on
		 this machine will be sent to the telnet port on the inside1
		 machine.

		       tcp inside2:2300-2399 3300-3399

		 will redirect incoming connections on ports 3300-3399 to host
		 inside2, ports 2300-2399.  The mapping is 1:1 meaning port
		 3300 maps to 2300, 3301 maps to 2301, etc.

Port forwarding

Multam. Asta am inteles. Dar cu ipfw nu fac nimic? Nu trebuie sa-i dau nici o instructiune?

Port forwarding

Hmm, nu cred. Am facut si eu mai demult un portforwarding cu natd si aveam in ipfw doar un divert, parca. Oricum, de translatia adreselor (NAT) si de port forwarding se ocupa natd, ipfw doar filtreaza si trimite pachete spre natd prin socketul divert, deci nu cred ca e necesara nici o regula.

Acum nici nu mai stiu exact unde trebuie bagata asta, parca in rc.conf la flagurile natd. Nu pot sa-ti dau un exemplu practic pentru ca nu folosesc natd...