DNAT/SNAT stuff

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

 




current setup, 

$IPTABLES -t nat -A PREROUTING -i eth0 -d 210.54.175.12 -p tcp --dport
4661 -j DNAT --to 10.0.0.3
$IPTABLES -t nat -A PREROUTING -i eth0 -d 210.54.175.12 -p tcp --dport
4662 -j DNAT --to 10.0.0.3
$IPTABLES -t nat -A POSTROUTING -o eth0 -s 10.0.0.3 -p tcp --sport 4661
-j SNAT --to 210.54.175.12
$IPTABLES -t nat -A POSTROUTING -o eth0 -s 10.0.0.3 -p tcp --sport 4662
-j SNAT --to 210.54.175.12
$IPTABLES -t nat -A PREROUTING -i eth0 -d 210.54.175.12 -p udp --dport
4665 -j DNAT --to 10.0.0.3
$IPTABLES -t nat -A PREROUTING -i eth0 -d 210.54.175.12 -p udp --dport
4672 -j DNAT --to 10.0.0.3
$IPTABLES -t nat -A POSTROUTING -o eth0 -s 10.0.0.3 -p udp --sport 4665
-j SNAT --to 210.54.175.12
$IPTABLES -t nat -A POSTROUTING -o eth0 -s 10.0.0.3 -p udp --sport 4672
-j SNAT --to 210.54.175.12

i would like specify 10.0.0.x instead of 10.0.0.3, how is this done?

and some problems i had attempting it..

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.2.6a: Bad IP address `10.0.0.0/24'
iptables v1.2.6a: host/network `10.0.0.3-10.0.0.8' not found
Try `iptables -h' or 'iptables --help' for more information.

cc: please :)
-- 
mdew <mdew@xxxxxxxxxxxx>



[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