Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I need to forward the packet from ppp0, then forward to another server, how to do this, thanks!

share|improve this question
2  
Can you elaborate more please? –  Khaled Nov 15 '10 at 7:55
    
thanks! I need to forward packets from one PPTP server(ip is 172.17.0.10 and interface is ppp0) to another server (10.10.10.10 eth1), then I can capture the packet on 10.10.10.10. –  larry Nov 15 '10 at 9:21

2 Answers 2

up vote 2 down vote accepted

iptables -t nat -A PREROUTING -i ppp0 -j DNAT --to-destination x.x.x.x

share|improve this answer
    
but it gave me an error: Bad argument '10.10.10.10' :( –  larry Nov 15 '10 at 9:42
1  
-j DNAT --to <ip address to forawrd traffic> –  vnix27 Nov 15 '10 at 10:17
    
Thanks ! you help me very much!!! –  larry Nov 16 '10 at 7:06

iptables does not forward packets, the routing engine does (to be configured with ip route).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.