Hi,
I'm getting some trouble with LAN to LAN setup.
I'm having two remote sites (site A and site B) and a central one.
Site A where internal IP is 192.168.11.0/24 is connecting fine to the central site (192.168.1.0/24 network).
I've also setup in PPTP Server User Accounts the optional static route.
PING is fine both directions from any machine in each site.
Same settings were done for Site B. This site has the 192.168.10.0/24 network.
I have also setup same way the user account to have a static route. This site also connects fine but the static route is not applying at all. This way, I can PING from Site B machines to central Site but it is not working in the opposite direction.
I don't know how to solve this and what to do to make both connections to correctly apply the static routes fine.
Site A has an Asus AC66, the Site B an Asus AC68 and the central one has the Asus N66U.
All of them had the latest Asus official firmware and not all flashed with Asus Merlin latest which didn't change the situation at all.
What can I do, what am I missing?
I will post the contents of the /tmp/pptpd/ip-up file:
Looking over and started to study bash, found out that the [ should have a space before (meaning if [ not if[ ) and also the semicolon that were following then should have been before it (like ;then) or just put then word all alone in a new line.
Stating this, the IF is not functioning and my only question is how is this even working for the "s2s" (Site A) connection.
Even later edit: removing from Site A ("s2s") the static route option in the router web interface, now Site B will apply the static route fine. Conclusion for now is that only first static route in list is applied correctly.
I'm getting some trouble with LAN to LAN setup.
I'm having two remote sites (site A and site B) and a central one.
Site A where internal IP is 192.168.11.0/24 is connecting fine to the central site (192.168.1.0/24 network).
I've also setup in PPTP Server User Accounts the optional static route.
PING is fine both directions from any machine in each site.
Same settings were done for Site B. This site has the 192.168.10.0/24 network.
I have also setup same way the user account to have a static route. This site also connects fine but the static route is not applying at all. This way, I can PING from Site B machines to central Site but it is not working in the opposite direction.
I don't know how to solve this and what to do to make both connections to correctly apply the static routes fine.
Site A has an Asus AC66, the Site B an Asus AC68 and the central one has the Asus N66U.
All of them had the latest Asus official firmware and not all flashed with Asus Merlin latest which didn't change the situation at all.
What can I do, what am I missing?
I will post the contents of the /tmp/pptpd/ip-up file:
Code:
admin@RT-N66U:/tmp/pptpd# cat ip-up
#!/bin/sh
startservice set_routes
echo $PPPD_PID $1 $5 $6 $PEERNAME >> /tmp/pptp_connected
iptables -I INPUT -i $1 -j ACCEPT
iptables -I FORWARD -i $1 -j ACCEPT
iptables -I FORWARD -i $1 -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
iptables -t nat -I PREROUTING -i $1 -p udp -m udp --sport 9 -j DNAT --to-destination 192.168.1.255
iptables -t mangle -A FORWARD -i $1 -m state --state NEW -j MARK --set-mark 0x01/0x7
if[ "$PEERNAME" == "s2s" ] then;
route del -net 192.168.11.0 netmask 255.255.255.0
route add -net 192.168.11.0 netmask 255.255.255.0 dev $1
fi
if[ "$PEERNAME" == "s2s_Office" ] then;
route del -net 192.168.10.0 netmask 255.255.255.0
route add -net 192.168.10.0 netmask 255.255.255.0 dev $1
fi
admin@RT-N66U:/tmp/pptpd#
Looking over and started to study bash, found out that the [ should have a space before (meaning if [ not if[ ) and also the semicolon that were following then should have been before it (like ;then) or just put then word all alone in a new line.
Stating this, the IF is not functioning and my only question is how is this even working for the "s2s" (Site A) connection.
Even later edit: removing from Site A ("s2s") the static route option in the router web interface, now Site B will apply the static route fine. Conclusion for now is that only first static route in list is applied correctly.
Last edited: