Netfilter 1.2.7a (debian), rule (DNAT) problems

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

 



On Wed, 13 Nov 2002 17:41:57 +0100 040 <madmac@swipnet.se> wrote:
>  Hello.
> 
>  Now I want to add a rule to forward all incoming data on port 4662 (TCP)
>  
>  from the internet (eth1) to
>  a server on my LAN, namely host 192.168.0.7 (via eth0), so I add the 
>  following rule (under *nat):
>  -A PREROUTING -p tcp -m tcp -i eth1 --dport 4662 -j DNAT
>  --to-destination 192.168.0.7:4662
You have to add rules in FORWARD CHAIN.
iptables -A FORWARD -p tcp -i eth1 -o eth0 -d 192.168.0.7 --dport 4662 -j
ACCEPT

iptables -A FORWARD -p tcp -i eth0 -o eth1 -s 192.168.0.7 --sport 4662 -j
ACCEPT

PAvlos

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I love having the feeling of being in control
while i have the sensation of speed

The surfer of life
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux