M
M
MainNika2010-11-24 00:45:11
linux
MainNika, 2010-11-24 00:45:11

Routing in Linux, iptables help

Hello.
There is a server on the network (192.168.1.0/24 eth1) that has access to the provider's resources (for example, 78.29.0.0/23 and all of them via eth0) and the ability to access the Internet via pptp.

I connect via pptp, the ppp0 interface appears.
For Internet routing, I write:
route -net 0.0.0.0/0 dev ppp0
the Internet is working, internal resources are being pinged.
I prescribe rules for masquerading on it so that computers on the internal network can access the Internet through this server as a gateway.
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
The Internet network is available, but there is no access to the provider's resources (judging by the traceroute, packets do not go beyond the gateway 192.168.1.1). What rule can make this access?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
nicolnx, 2010-11-24
@MainNika

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

S
Sergey, 2010-11-24
@bondbig

route add -net 78.29.0.0 netmask 255.255.254.0 dev eth1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question