All of lore.kernel.org
 help / color / mirror / Atom feed
* [HELP] forward ppp0 to eth1
@ 2009-11-05 13:32 Sandy Sumitro
  2009-11-06 15:59 ` Gáspár Lajos
  0 siblings, 1 reply; 2+ messages in thread
From: Sandy Sumitro @ 2009-11-05 13:32 UTC (permalink / raw)
  To: netfilter

Dear All,

My current situation:

I have one computer:
- eth0 -> connected to and dial DSL modem (pppoe), no IP
- eth1 -> connected to LAN, IP: 192.168.1.251
- ppp0 -> up after dialup (dynamic IP)

I have another computer with IP: 192.168.1.252

What i want is:
- i want to redirect all request to ppp0 to eth1, which will forward
to another computer (192.168.1.252).

I am using these rules, but not working:

iptables -F INPUT
iptables -F OUTPUT
iptables -F FORWARD
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -t nat -F
iptables -t nat -A PREROUTING -i ppp0 -j DNAT --to-destination 192.168.1.252
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 192.168.1.252 -o ppp0 -j MASQUERADE

PS: i have set /proc/sys/net/ipv4/ip_forward to 1
(echo 1 > /proc/sys/net/ipv4/ip_forward)

Please help.
Best regards,
Sandy

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-11-06 15:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-05 13:32 [HELP] forward ppp0 to eth1 Sandy Sumitro
2009-11-06 15:59 ` Gáspár Lajos

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.