ColinTaylor
Part of the Furniture
I think to get any further with this you'll need to run Wireshark on a PC that's having problems an see what the incoming traffic looks like.
I would look at a Wireshark capture running on one of the target devices in 192.168.10.x, not the device running the VPN client. My belief is that the pings are reaching their target but not returning for some reason.Otherwise, what should I be looking for in Wireshark more specifically?
Maybe SSH into the router (192.168.10.7) and issue the following command. The output might give us a clue to something.I found this old thread: https://www.snbforums.com/threads/static-routes-not-working-as-expected-in-asuswrt-merlin.11429/
However, that is a bit complicated for my level of skills. If any of that is pertinent, what solution should I try from there?
iptables-save
192.168.10.8 ?EDIT2: The pingability of 192.168.10.7 and 192.168.10.8 returned after I had to force the OpenVPN router (192.168.10.7) to synchronise time from an NTP server.
Maybe SSH into the router (192.168.10.7) and issue the following command. The output might give us a clue to something.
Code:iptables-save
/tmp/home/root# iptables-save
# Generated by iptables-save v1.4.15 on Sat Nov 30 06:00:50 2019
*raw
:PREROUTING ACCEPT [62661:7171578]
:OUTPUT ACCEPT [44796:58942521]
COMMIT
# Completed on Sat Nov 30 06:00:50 2019
# Generated by iptables-save v1.4.15 on Sat Nov 30 06:00:50 2019
*nat
:PREROUTING ACCEPT [776:55021]
:INPUT ACCEPT [715:44553]
:OUTPUT ACCEPT [131:10343]
:POSTROUTING ACCEPT [131:10343]
-A PREROUTING -p udp -m udp --dport 1194 -j ACCEPT
-A PREROUTING -p tcp -m tcp --dport 1194 -j ACCEPT
COMMIT
# Completed on Sat Nov 30 06:00:50 2019
# Generated by iptables-save v1.4.15 on Sat Nov 30 06:00:50 2019
*mangle
:PREROUTING ACCEPT [10628:1404903]
:INPUT ACCEPT [10540:1391217]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [7694:4917973]
:POSTROUTING ACCEPT [7694:4917973]
-A PREROUTING -i tun21 -j MARK --set-xmark 0x1/0x7
-A FORWARD -p udp -m udp --dport 5060 -j MARK --set-xmark 0x1/0x7
-A FORWARD -p tcp -m tcp --dport 5060 -j MARK --set-xmark 0x1/0x7
COMMIT
# Completed on Sat Nov 30 06:00:51 2019
# Generated by iptables-save v1.4.15 on Sat Nov 30 06:00:51 2019
*filter
:INPUT ACCEPT [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [7695:4918461]
:ACCESS_RESTRICTION - [0:0]
:DNSFILTER_DOT - [0:0]
:FUPNP - [0:0]
:INPUT_ICMP - [0:0]
:NSFW - [0:0]
:OVPN - [0:0]
:PControls - [0:0]
:PTCSRVLAN - [0:0]
:PTCSRVWAN - [0:0]
:SECURITY - [0:0]
:default_block - [0:0]
:logaccept - [0:0]
:logdrop - [0:0]
:other2wan - [0:0]
-A INPUT -p udp -m udp --dport 1194 -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j logaccept
-A INPUT -m state --state INVALID -j logdrop
-A INPUT ! -i br0 -j PTCSRVWAN
-A INPUT -i br0 -j PTCSRVLAN
-A INPUT -i br0 -m state --state NEW -j ACCEPT
-A INPUT -i lo -m state --state NEW -j ACCEPT
-A INPUT -m state --state NEW -j OVPN
-A INPUT -p udp -m udp --sport 67 --dport 68 -j logaccept
-A INPUT -p icmp -j logaccept
-A INPUT -j logdrop
-A FORWARD -m state --state RELATED,ESTABLISHED -j logaccept
-A FORWARD ! -i br0 -o eth0 -j other2wan
-A FORWARD -i br0 -o br0 -j logaccept
-A FORWARD -s 192.168.10.0/24 -i br0 -o br0 -j ACCEPT
-A FORWARD -m state --state INVALID -j logdrop
-A FORWARD -j NSFW
-A FORWARD -i br0 -j ACCEPT
-A FORWARD -m state --state NEW -j OVPN
-A FORWARD -j logdrop
-A OVPN -d 192.168.10.0/24 -i tun21 -j ACCEPT
-A PControls -j logaccept
-A SECURITY -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -m limit --limit 1/sec -j RETURN
-A SECURITY -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j logdrop
-A SECURITY -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK RST -m limit --limit 1/sec -j RETURN
-A SECURITY -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK RST -j logdrop
-A SECURITY -p icmp -m icmp --icmp-type 8 -m limit --limit 1/sec -j RETURN
-A SECURITY -p icmp -m icmp --icmp-type 8 -j logdrop
-A SECURITY -j RETURN
-A logaccept -m state --state NEW -j LOG --log-prefix "ACCEPT " --log-tcp-sequence --log-tcp-options --log-ip-options
-A logaccept -j ACCEPT
-A logdrop -m state --state NEW -j LOG --log-prefix "DROP " --log-tcp-sequence --log-tcp-options --log-ip-options
-A logdrop -j DROP
-A other2wan -i tun+ -j RETURN
-A other2wan -j logdrop
COMMIT
# Completed on Sat Nov 30 06:00:51 2019
192.168.10.8 ?
From the PC (192.168.10.12) and with the VPN tunnel connected, can you ping 192.168.10.7 and 192.168.8.1 and 192.168.8.2 ?
EDIT2: The pingability of 192.168.10.7 and 192.168.10.8 returned after I had to force the OpenVPN router (192.168.10.7) to synchronise time from an NTP server.
I believe this is significant. What you're saying is that as far as the printer at 192.168.10.8 is concerned the VPN connection is working. So what is different about that device compared to another that isn't working?That is a random printer. Really a random one. There is another printer at 192.168.10.9 but that is not pingable.
route ADD 192.168.8.0 MASK 255.255.255.0 192.168.10.7
I believe this is significant. What you're saying is that as far as the printer at 192.168.10.8 is concerned the VPN connection is working. So what is different about that device compared to another that isn't working?
I see you have logging of dropped and accepted packets turned on. Do you see any of these messages in the router's syslog when pinging across the tunnel (in either direction)?
Another thing you could try (just because you can) is to manually add a static route on one of the target Windows PCs. This would eliminate the local Linksys router from the redirect process for that PC. So from an administrator command prompt:
Code:route ADD 192.168.8.0 MASK 255.255.255.0 192.168.10.7
iptables -t nat -A POSTROUTING -s 192.168.8.0/24 -o br0 -j MASQUERADE
Not at all . It just means we've completely ignored the problems with (presumably) the Linksys and taken a completely different approach.Which seems to mean that the Linksys was not the problem?
So rather than trying to solve the problem of the clients not being able to find a route back to the VPN tunnel (192.168.8.1), we've told the router to masquerade (change the source IP address of) everything coming out of the tunnel and pretend it's coming from the router's address (192.168.10.7) instead. The router keeps track of these address changes so that when the traffic tries to return it "undoes" the changes to the IP address.But what exactly is the problem and how can I make the solution permanent?
#!/bin/sh
iptables -t nat -A POSTROUTING -s 192.168.8.0/24 -o br0 -j MASQUERADE
iptables-save -t nat
ls -l /etc/resolv.conf
cat /etc/resolv.conf
#!/bin/sh
echo "nameserver 192.168.10.1" > /tmp/resolv.conf
ntpclient -h pool.ntp.org -i 3 -l -s
service restart_vpnserver1
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!