tux-user n00b

Joined: 11 Jun 2010 Posts: 1 Location: Italy
|
Posted: Fri Jun 11, 2010 12:16 pm Post subject: tftp + snat = PROBLEMS |
|
|
hi,
I have successfully configured dhcp+tftp+dns and iptables
i have 2 nic wlan0 192.168.1.14 static (wan) eth0 192.168.2.1 static (lan) net.ipv4.ip_forward = 1 in /etc/sysctl.conf
all traffic generate from lan for any different network is masqueraded with wlan0-ip here mi iptables config about POSTROUTING chain
SNAT all -- 192.168.2.0/24 !192.168.2.0/24 to:192.168.1.14
all works fine exept tftp server i tried atftp and tftp-hpa that is my current running tftp server version (5.0 installed from portage) i know that this daemon could be bound to a specific address i tried but without success.
here my /etc/init.d/in.tftpd
INTFTPD_PATH="/tftproot/nbi_img/"
INTFTPD_OPTS="-l -a 192.168.2.1:69 -R 4096:32767 -s ${INTFTPD_PATH}"
here the relevant resoult of netstat output
udp 0 0 192.168.2.1:69 0.0.0.0:* 8982/in.tftpd
tftp clients wait up to timeout. i used tcpdump to capture eth0 traffic during a tftp connection the problem seems to be the server reply that have wlan0 ip as source!
if i stop iptables daemon, tftp server works great but unfortunately i can't have an internet connection for 192.168.2.0 network
i have all iptables features compiled as modules in mi kernel (2.6.31-gentoo-r6) nothing change if i load tftp related molules
here the relevant resoult of lsmod output
iptable_nat 5496 1
ip_tables 17032 2 iptable_filter,iptable_nat
nf_nat_tftp 1752 0
nf_nat 18124 2 iptable_nat,nf_nat_tftp
nf_conntrack_ipv4 14736 3 iptable_nat,nf_nat
nf_defrag_ipv4 2072 1 nf_conntrack_ipv4
nf_conntrack_tftp 5268 1 nf_nat_tftpevant resoult of lsmod output
i read lot of person with similar problems but i could not find a suitable solution for my
THK to all for any reply and sorry for my english! |
|