Some nat configuration problem with iptables.



I configured iptables to support nat, the configuration just like this:
iptables -t nat -A PREROUTING -d 47.154.129.34 -p udp -m udp --dport
20002 -j DNAT --to-destination 172.16.2.145:5000
iptables -t nat -A POSTROUTING -s 47.152.0.0/255.255.0.0 -d
172.16.2.145 -p udp -m udp --dport 5000 -j SNAT --to-source 10.200.6.20


I also set ip_forward true in sysctl.conf.
the questions is:
1. In Fedora core 5, I set ip_foward true in sysctl.conf, the nat
configuration can work well. but in Fedora core 6, I did like this and
found it can't work. After I used 'echo 1 >
/proc/sys/net/ipv4/ip_forward', it began to work, why? is there
difference between them?

2. From my nat configuration, I mainly want to nat UDP packets. I have
a terminal which will connect to equipments through my linux server,
the nat can work well, the equipments will send udp packets like
heartbeat to terminal every 2 mins. But I found my linux server won't
transfer the heartbeat to terminal. I guesses the iptables won't keep
this ip-to-port map relationship too long. It will clear up some
'unused' map. If so , How can I configure it? I tried to change
'net.ipv4.netfilter.ip_conntrack_udp_timeout_stream' and
'net.ipv4.netfilter.ip_conntrack_udp_timeout', but no useful. Someone
told me that iptables has a bug with VOIP, is this ture?

many thanks.

.



Relevant Pages

  • Re: SBS 2003 Misconfigured?
    ... I could 'guess' that the configuration, as you described it, is the netopia ... configured as a bridge and the netgear as the NAT device. ...
    (microsoft.public.windows.server.sbs)
  • Re: Windows 2K3 and Virtual Server 2005 guests NAT problem
    ... The first thing to check is that you have configured NAT correctly. ... internal network. ... in seeing the actual configuration and what your settings are. ... If you have configured DNS on the host and have set your vms to use ...
    (microsoft.public.windows.server.networking)
  • Re: High CPU util on 3825
    ... There are plenty of NAT and access lists available. ... Below is a stripped version of the configuration. ... ip inspect name firewall cuseeme timeout 3600 ... crypto pki certificate chain TP-self-signed-4150674149 ...
    (comp.dcom.sys.cisco)
  • c2821 vpn with bgp problem
    ... crypto isakmp client configuration group VPN ... crypto map dynmap client authentication list userauthen ... ip nat inside ... interface GigabitEthernet0/0 ...
    (comp.dcom.sys.cisco)
  • Weird NAT/Routing Issue.
    ... utilizing NAT to connect their network to their ISP. ... IP address configured in a /30 as the router inteface IP, ... The relevant portion of the configuration looks ... simply ping one IP address on the internet so that there is outbound traffic ...
    (comp.dcom.sys.cisco)