Answer the question
In order to leave comments, you need to log in
Rules for iptables. Two VPNs over One External IP [SOLVED]
Need help writing rules for iptables (ubuntu 10.10).
Network structure:
Server - network eth1 192.168.0.1/24 and modem adsl ppp0 8.8.8.8 through it go to the Internet.
There are 2 PCs with addresses 192.168.0.2 and 192.168.0.3 on both networks. VPN is up.
The first PC 192.168.0.2 vnp connects to the Internet address 9.9.9.9
The
second PC 192.168.0.3 vnp connects to the Internet address 10.10.10.10
interface ppp0
Now it turns out that only one of the PCs can work, the second vnp is not tied.
TCPDUMP gives such information IP 192.168.0.3.500 > 10.10.10.10.500: isakmp: phase 1 I ident
and so it repeats
Answer the question
In order to leave comments, you need to log in
echo 1 > /proc/sys/net/ipv4/ip_forward # /etc/sysctl.conf
$IPT -v -t mangle -A PREROUTING -i eth1 -s 192.168.0.1 -j MARK --set-mark 10
$IPT - v -t mangle -A PREROUTING -i eth1 -s 192.168.0.2 -j MARK --set-mark 10
$IPT -v -t mangle -A PREROUTING -i eth1 -s 192.168.0.3 -j MARK --set-mark 10
$IPT -v -t nat -A POSTROUTING -o ppp0 -m mark --mark 10 -j SNAT --to-source=8.8.8.8
will route everything, add restrictions and forward ports to client ports if necessary. Not this way?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question