Source port NAT

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

 



HI.

I need some helps with port forwarding.
I have a SNMP agent listen on port 1610 (not 161 for rights restriction).
External applications send query to 161 port and wait response from this port.
Here's my configuration:

eth0:  192.168.0.1
eth0:0 192.168.0.2

iptables -t nat -I PREROUTING -p udp -d 192.168.0.2 --dport 161 -j
DNAT --to-destination 192.168.0.1:1610
iptables -t nat -I POSTROUTING -p udp -s 192.168.0.1 --sport 1611 -j
SNAT --to-source 192.168.0.2:161

When I query agent on 192.168.0.1:1610, I receive correct response from
192.168.0.2:161. But, when I query agent on 192.168.0.2:161, agent
log an error:
IOException: Operation not permitted.

If anybody can help me it would be appreciated.

Thank you !


[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