xinetd doesn't work properly
want to set up xinetd to forwarding some message, but has some problem..
on xinetd.conf ... service telnet { socket_type = stream wait = no server = /usr/sbin/in.telnetd log_on_success += DURATION USERID log_on_failure += USERID bind = 127.0.0.1 redirect = 192.168.0.244 21 23 } ... when I telnet to the above server, it doesn't forward to 192.168.0.244, only stay on itself.I can use tcpdump to see the package ... [root@wikisvr ~]# tcpdump port 23 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes 14:27:41.248238 IP 192.168.0.242.43589 > 192.168.0.248.telnet: S 3214467077:3214467077(0) win 5840 <mss 1460,sackOK,timestamp 2673855246 0,nop,wscale 7> 14:27:41.372006 IP 192.168.0.248.telnet > 192.168.0.242.43589: R 0:0(0) ack 3214467078 win 0 ... Anything I miss on the configuration? Thx in advance. |
Is that a typo? You have 2 port numbers listed after the IP address on the redirect line:
Code:
redirect = 192.168.0.244 21 23 Code:
redirect = 192.168.0.244 23 |
Problem solved, just don't have time to update here.
1.It can have more than one port number after the ip address. 2.Problem is I forgot to set net.ipv4.ip_forward to 1 (default is 0). 3.For saving time, I changed to use iptables -t nat -A prerouting... to do the forwarding thx all the help |
All times are GMT -5. The time now is 03:35 PM. |