routing - I'm in iptable hell -


so i'm relatively new iptable routing, i'm trying should easy.

i'm trying direct traffic ip block, i'm using program called inetsim , use ip-address bind address , become similar router. i'm using 192.168.444.1 gateway , dns server per config instructions. there options toward bottom use routing have yet friendly. have 2 eth ports called eth0 , eth1 ip-addresses on them 10.10.10.123 , 192.168.444.1 respectively. have reporting server on 10.10.10.250.

the machines follows 192.168.444.2 windows7sp1 192.168.444.1 + 10.10.10.123 debian server

the reporting server has program sets connection target machine reporting server. under normal circumstances work without hitch, inetsim internet blackhole of sorts creates iptables route traffic fakenet including unknown services, routed dummy port 1.

i need way of forwarding packet destined 10.10.10.250:48002 192.168.444.2[connected 192.168.444.1] through 10.10.10.123[unless there easier way of doing this]. have tried snat , dnat seems mangles packets come out differently server rejects packets gets. windows machine states has , established connection said through packet inspection seems not these packets.

the way done not modify actual packet @ all, or @ least little possible. if need rules iptables made or rules inetsim outputs can post those.

any appreciated. thank guys!

[edit: have tried ton of different rules, i'm not asking because want else me. i've been doing weeks , got working once. tried replicate , broke.]

if involved hosts have debian ip in segment default route, need no iptables @ all, activate net.ipv4.ip_forward in /etc/sysctl.conf , if need keep iptables activated make sure default policy forward table accept.

if 192.168.444.2 machine has .1 ip route reporting server doesn't (you'll see connections in reporting server queuing syn_recv) you'll need masquerade target:

iptables -t nat -a postrouting -o eth0 -j masquerade 

Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -