[Firehol-support] Redirecting ports to other computers

Andre Marenke andre.marenke at ampwest.com.au
Fri Jan 28 01:14:11 GMT 2005


Hi,

Francis Brosnan Blazquez wrote:

> A concrete scenario is follows: a have two boxes behind a firewall
> (running firehol ;-) and I need to allow incoming connections to, for
> example, port 2222 and enroute this connection to port 22.

...

> Is there any way to support this by using only firehol or using redir is
> a acceptable solution?.

dnat to <internal_ip>:22 inface <interface> dst <external_ip> proto tcp 
dport 2222

If I understood you correctly this will do what you want. Put that at 
the beginning of your firehol.conf and restart firehol. Replace 
internal_ip, external_ip and interface with values matching your setup, eg:

dnat to 10.0.2.2:22 inface eth0 dst 256.162.32.14 proto tcp dport 2222

If you have a dynamic IP on your external interface you can probably 
leave off the dst directive, but I am not sure. Check the manual on dnat 
for more info.

Andre Marenke




More information about the Firehol-support mailing list