[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: iptables forwarding to inside firewall



Hi,

iptables -t nat -A PREROUTING -p udp -d 130.161.65.18 --dport 2074 -j DNAT --to
192.168.6.2:2074
iptables -t nat -A PREROUTING -p udp -d 130.161.65.18 --dport 2075 -j DNAT --to
192.168.6.2:2075

works nicely to forward external speek freely traffic (uses 2 ports) to my
computer inside my firewall.

I hope it helps.

cheers, joost.

Quoting Hanasaki JiJi <hanasaki@hanaden.com>:

> Working on running a SMTP server inside the firewall that takes incoming 
> SMTP traffic from outside the firewall.  The below rules are not 
> working.  The firewall refuses connections.  Any input on what wrong?
> 
> Thanks,
> 
> internal mailserver = 192.168.1.2
> 
> 
> 
> #$PROG -t nat -A PREROUTING -i $NIC_EXTERNAL -p tcp \
>          #-s 0/0 \
>          #--dport smtp -j DNAT --to-destination 192.168.1.2:25
> 
> #$PROG -A FORWARD -i $NIC_EXTERNAL -s 0/0 \
>          #-o $NIC_INTERNAL -d 192.168.1.2 -p tcp --dport smtp \
>          #-m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
> 
> #$PROG -A FORWARD -i $NIC_INTERNAL -s 192.168.1.2 \
>          #-o $NIC_EXTERNAL -d 0/0 -p tcp \
>          #-m state --state ESTABLISHED,RELATED -j ACCEPT

-- 

10000 00001

-------------------------------------------------
Support open source software like
 - Linux (Debian is a nice example)
 - Apache
 - PHP
 - MySQL
 - Horde
and many others...



Reply to: