Unfortunately my last topic was closed (sorry, holiday - Losing access to RUT360 after connecting it to OpenVPN server) and I’m still trying to figure it out.
As AndzejJ suggested, I did bridge tap with eth0 and use the
`logread-f’
command during the connection phase. The SSH connection was broken after this part:
Thu Sep 7 13:34:35 2023 daemon.warn openvpn(Sterbit)[13845]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Thu Sep 7 13:34:35 2023 daemon.notice openvpn(Sterbit)[13845]: TCP/UDP: Preserving recently used remote address: [AF_INET]85.221.216.110:1199
Thu Sep 7 13:34:35 2023 daemon.notice openvpn(Sterbit)[13845]: Socket Buffers: R=[131072->131072] S=[16384->16384]
Thu Sep 7 13:34:35 2023 daemon.notice openvpn(Sterbit)[13845]: Attempting to establish TCP connection with [AF_INET]85.221.216.110:1199 [nonblock]
Thu Sep 7 13:34:35 2023 daemon.notice openvpn(Sterbit)[13845]: TCP connection established with [AF_INET]85.221.216.110:1199
Thu Sep 7 13:34:35 2023 daemon.notice openvpn(Sterbit)[13845]: TCP_CLIENT link local: (not bound)
Thu Sep 7 13:34:35 2023 daemon.notice openvpn(Sterbit)[13845]: TCP_CLIENT link remote: [AF_INET]85.221.216.110:1199
Thu Sep 7 13:34:35 2023 daemon.notice openvpn(Sterbit)[13845]: TLS: Initial packet from [AF_INET]85.221.216.110:1199, sid=09065a2a 4fcfc981
Thu Sep 7 13:34:35 2023 daemon.notice openvpn(Sterbit)[13845]: VERIFY OK: depth=1, CN=Sterbit
Thu Sep 7 13:34:35 2023 daemon.notice openvpn(Sterbit)[13845]: VERIFY OK: depth=0, CN=server
Thu Sep 7 13:34:35 2023 daemon.notice openvpn(Sterbit)[13845]: Control Channel: TLSv1.2, cipher TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384, peer certificate: 2048 bit RSA, signature: RSA-SHA256
Thu Sep 7 13:34:35 2023 daemon.notice openvpn(Sterbit)[13845]: [server] Peer Connection Initiated with [AF_INET]85.221.216.110:1199
Thu Sep 7 13:34:36 2023 daemon.notice openvpn(Sterbit)[13845]: SENT CONTROL [server]: 'PUSH_REQUEST' (status=1)
Thu Sep 7 13:34:36 2023 daemon.notice openvpn(Sterbit)[13845]: PUSH: Received control message: 'PUSH_REPLY,route-gateway 192.168.3.230,ping 10,ping-restart 60,ifconfig 192.168.3.232 255.255.255.0,peer-id 0,cipher AES-256-GCM'
Thu Sep 7 13:34:36 2023 daemon.notice openvpn(Sterbit)[13845]: OPTIONS IMPORT: timers and/or timeouts modified
Thu Sep 7 13:34:36 2023 daemon.notice openvpn(Sterbit)[13845]: OPTIONS IMPORT: --ifconfig/up options modified
Thu Sep 7 13:34:36 2023 daemon.notice openvpn(Sterbit)[13845]: OPTIONS IMPORT: route-related options modified
Thu Sep 7 13:34:36 2023 daemon.notice openvpn(Sterbit)[13845]: OPTIONS IMPORT: peer-id set
Thu Sep 7 13:34:36 2023 daemon.notice openvpn(Sterbit)[13845]: OPTIONS IMPORT: adjusting link_mtu to 1658
Thu Sep 7 13:34:36 2023 daemon.notice openvpn(Sterbit)[13845]: OPTIONS IMPORT: data channel crypto options modified
Thu Sep 7 13:34:36 2023 daemon.notice openvpn(Sterbit)[13845]: Data Channel: using negotiated cipher 'AES-256-GCM'
Thu Sep 7 13:34:36 2023 daemon.notice openvpn(Sterbit)[13845]: Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Thu Sep 7 13:34:36 2023 daemon.notice openvpn(Sterbit)[13845]: Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Thu Sep 7 13:34:37 2023 kern.info kernel: [ 2537.826703] br-lan: port 2(tap_c_Sterbit) entered blocking state
Thu Sep 7 13:34:37 2023 kern.info kernel: [ 2537.833003] br-lan: port 2(tap_c_Sterbit) entered disabled state
Thu Sep 7 13:34:37 2023 kern.info kernel: [ 2537.839687] device tap_c_Sterbit entered promiscuous mode
This part I recovered from logread after disabling the connection and login again via SSH.
Thu Sep 7 13:34:37 2023 kern.info kernel: [ 2537.845627] br-lan: port 2(tap_c_Sterbit) entered blocking state
Thu Sep 7 13:34:37 2023 kern.info kernel: [ 2537.851927] br-lan: port 2(tap_c_Sterbit) entered forwarding state
Thu Sep 7 13:34:37 2023 daemon.notice openvpn(Sterbit)[13845]: TUN/TAP device tap_c_Sterbit opened
Thu Sep 7 13:34:37 2023 daemon.notice openvpn(Sterbit)[13845]: net_iface_mtu_set: mtu 1500 for tap_c_Sterbit
Thu Sep 7 13:34:37 2023 daemon.notice openvpn(Sterbit)[13845]: net_iface_up: set tap_c_Sterbit up
Thu Sep 7 13:34:37 2023 daemon.notice openvpn(Sterbit)[13845]: net_addr_v4_add: 192.168.3.232/24 dev tap_c_Sterbit
Thu Sep 7 13:34:37 2023 daemon.notice openvpn(Sterbit)[13845]: /etc/openvpn/updown.sh tap_c_Sterbit 1500 1586 192.168.3.232 255.255.255.0 init
Thu Sep 7 13:34:37 2023 daemon.notice netifd: Network device 'tap_c_Sterbit' link is up
Thu Sep 7 13:34:37 2023 daemon.notice openvpn(Sterbit)[13845]: Initialization Sequence Completed
Thu Sep 7 13:34:39 2023 daemon.info dnsmasq[12781]: exiting on receipt of SIGTERM
Thu Sep 7 13:34:39 2023 daemon.info dnsmasq[20850]: Connected to system UBus
Thu Sep 7 13:34:39 2023 daemon.info dnsmasq[20850]: started, version 2.85 cachesize 150
Thu Sep 7 13:34:39 2023 daemon.info dnsmasq[20850]: compile time options: IPv6 GNU-getopt no-DBus UBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack no-ipset no-auth no-cryptohash no-DNSSEC no-ID loop-detect inotify dumpfile
Thu Sep 7 13:34:39 2023 daemon.info dnsmasq[20850]: UBus support enabled: connected to system bus
Thu Sep 7 13:34:39 2023 daemon.info dnsmasq[20850]: using only locally-known addresses for domain test
Thu Sep 7 13:34:39 2023 daemon.info dnsmasq[20850]: using only locally-known addresses for domain onion
Thu Sep 7 13:34:39 2023 daemon.info dnsmasq[20850]: using only locally-known addresses for domain localhost
Thu Sep 7 13:34:39 2023 daemon.info dnsmasq[20850]: using only locally-known addresses for domain local
Thu Sep 7 13:34:39 2023 daemon.info dnsmasq[20850]: using only locally-known addresses for domain invalid
Thu Sep 7 13:34:39 2023 daemon.info dnsmasq[20850]: using only locally-known addresses for domain bind
Thu Sep 7 13:34:39 2023 daemon.info dnsmasq[20850]: using only locally-known addresses for domain lan
Thu Sep 7 13:34:39 2023 daemon.info dnsmasq[20850]: reading /tmp/resolv.conf.d/resolv.conf.auto
Thu Sep 7 13:34:39 2023 daemon.info dnsmasq[20850]: using only locally-known addresses for domain test
Thu Sep 7 13:34:39 2023 daemon.info dnsmasq[20850]: using only locally-known addresses for domain onion
Thu Sep 7 13:34:39 2023 daemon.info dnsmasq[20850]: using only locally-known addresses for domain localhost
Thu Sep 7 13:34:39 2023 daemon.info dnsmasq[20850]: using only locally-known addresses for domain local
Thu Sep 7 13:34:39 2023 daemon.info dnsmasq[20850]: using only locally-known addresses for domain invalid
Thu Sep 7 13:34:39 2023 daemon.info dnsmasq[20850]: using only locally-known addresses for domain bind
Thu Sep 7 13:34:39 2023 daemon.info dnsmasq[20850]: using only locally-known addresses for domain lan
Thu Sep 7 13:34:39 2023 daemon.info dnsmasq[20850]: using nameserver 89.108.195.21#53
Thu Sep 7 13:34:39 2023 daemon.info dnsmasq[20850]: using nameserver 185.89.185.1#53
Thu Sep 7 13:34:39 2023 daemon.info dnsmasq[20850]: read /etc/hosts - 4 addresses
Thu Sep 7 13:34:39 2023 daemon.info dnsmasq[20850]: read /tmp/hosts/dhcp.cfg01411c - 0 addresses
Thu Sep 7 13:34:39 2023 daemon.info dnsmasq[20850]: read /etc/hosts - 4 addresses
Thu Sep 7 13:34:39 2023 daemon.info dnsmasq[20850]: read /tmp/hosts/dhcp.cfg01411c - 0 addresses
As for current settings, firewall
config defaults '1'
option syn_flood '1'
option output 'ACCEPT'
option flow_offloading '0'
option drop_invalid '0'
option input 'REJECT'
option auto_helper '0'
option forward 'REJECT'
config zone '2'
option name 'lan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
option masq '0'
option mtu_fix '0'
option network 'wlan lan'
config zone '3'
option name 'wan'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'
option network 'wan wan6 mob1s1a1'
config forwarding '4'
option src 'lan'
option dest 'wan'
config rule '5'
option name 'Allow-DHCP-Renew'
option src 'wan'
option proto 'udp'
option dest_port '68'
option target 'ACCEPT'
option family 'ipv4'
option priority '1'
option enabled '1'
config rule '6'
option name 'Allow-Ping'
option src 'wan'
option proto 'icmp'
option icmp_type 'echo-request'
option family 'ipv4'
option target 'ACCEPT'
option priority '2'
option enabled '1'
config rule '7'
option name 'Allow-IGMP'
option src 'wan'
option proto 'igmp'
option family 'ipv4'
option target 'ACCEPT'
option priority '3'
option enabled '1'
config rule '8'
option name 'Allow-DHCPv6'
option src 'wan'
option proto 'udp'
option src_ip 'fc00::/6'
option dest_ip 'fc00::/6'
option dest_port '546'
option family 'ipv6'
option target 'ACCEPT'
option priority '4'
option enabled '1'
config rule '9'
option name 'Allow-MLD'
option src 'wan'
option proto 'icmp'
option src_ip 'fe80::/10'
list icmp_type '130/0'
list icmp_type '131/0'
list icmp_type '132/0'
list icmp_type '143/0'
option family 'ipv6'
option target 'ACCEPT'
option priority '5'
option enabled '1'
config rule '10'
option name 'Allow-ICMPv6-Input'
option src 'wan'
option proto 'icmp'
list icmp_type 'echo-request'
list icmp_type 'echo-reply'
list icmp_type 'destination-unreachable'
list icmp_type 'packet-too-big'
list icmp_type 'time-exceeded'
list icmp_type 'bad-header'
list icmp_type 'unknown-header-type'
list icmp_type 'router-solicitation'
list icmp_type 'neighbour-solicitation'
list icmp_type 'router-advertisement'
list icmp_type 'neighbour-advertisement'
option limit '1000/sec'
option family 'ipv6'
option target 'ACCEPT'
option priority '6'
option enabled '1'
config rule '11'
option name 'Allow-ICMPv6-Forward'
option src 'wan'
option dest '*'
option proto 'icmp'
list icmp_type 'echo-request'
list icmp_type 'echo-reply'
list icmp_type 'destination-unreachable'
list icmp_type 'packet-too-big'
list icmp_type 'time-exceeded'
list icmp_type 'bad-header'
list icmp_type 'unknown-header-type'
option limit '1000/sec'
option family 'ipv6'
option target 'ACCEPT'
option priority '7'
option enabled '1'
config rule '12'
option name 'Allow-IPSec-ESP'
option src 'wan'
option dest 'lan'
option proto 'esp'
option target 'ACCEPT'
option priority '8'
option enabled '1'
config rule '13'
option name 'Allow-ISAKMP'
option src 'wan'
option dest 'lan'
option dest_port '500'
option proto 'udp'
option target 'ACCEPT'
option priority '9'
option enabled '1'
config include '14'
option path '/etc/firewall.user'
config rule '15'
option dest_port '22'
option proto 'tcp'
option name 'Enable_SSH_WAN'
option target 'ACCEPT'
option src 'wan'
option priority '10'
option enabled '1'
config rule '16'
option dest_port '80'
option proto 'tcp'
option name 'Enable_HTTP_WAN'
option target 'ACCEPT'
option src 'wan'
option priority '11'
option enabled '1'
config rule '17'
option dest_port '443'
option proto 'tcp'
option name 'Enable_HTTPS_WAN'
option target 'ACCEPT'
option src 'wan'
option priority '12'
option enabled '1'
config rule '18'
option dest_port '4200-4220'
option proto 'tcp'
option name 'Enable_CLI_WAN'
option target 'ACCEPT'
option src 'wan'
option priority '13'
option enabled '1'
config include 'pscan'
option port_scan '0'
option type 'script'
option path '/etc/port-scan-prevention.sh'
config include 'miniupnpd'
option type 'script'
option path '/usr/share/miniupnpd/firewall.include'
option family 'any'
option reload '1'
config rule '22'
option src 'wan'
option name 'Allow-openvpn-traffic'
option target 'ACCEPT'
option vpn_type 'openvpn'
option proto 'tcp udp'
option family 'ipv4'
option dest_port '1199'
config zone '23'
option name 'openvpn'
option device 'tun_+'
option input 'ACCEPT'
option output 'ACCEPT'
option masq '0'
option mtu_fix '0'
option forward 'ACCEPT'
config forwarding '24'
option dest 'lan'
option src 'openvpn'
config forwarding '25'
option dest 'openvpn'
option src 'lan'
Network
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fd38:a2d6:3c62::/48'
config interface 'lan'
option proto 'static'
option type 'bridge'
option netmask '255.255.255.0'
option metric '1'
option ip6assign '60'
option ipaddr '192.168.3.1'
option stp '0'
option ifname 'eth0 tap_c_Sterbit'
option delegate '0'
option force_link '0'
config interface 'wan'
option ifname 'eth1'
option proto 'dhcp'
option metric '2'
option disabled '1'
config interface 'wan6'
option ifname 'eth1'
option proto 'dhcpv6'
option metric '3'
option disabled '1'
config interface 'mob1s1a1'
option proto 'wwan'
option modem '1-1'
option metric '4'
option sim '1'
option dhcpv6 '0'
option pdptype 'ip'
option method 'nat'
option auth 'none'
option force_apn '-1'
option apn 'internet'
option pdp '1'
option auto_apn '0'
option pref_apn '568'
config interface 'wlan'
option metric '5'
option ipaddr '192.168.89.1'
option netmask '255.255.255.0'
option delegate '1'
option force_link '0'
option proto 'static'
What is more, now I have access to the device during the whole process thanks to WiFi.
I also tried with a newer version of OpenVPN server (2.6) but I’m still getting the same results. The connection is established “correctly” and I can access the devices connected to the RUT via LAN port through the OpenVPN connection from another client, but no luck with accessing the RUT itself.
Do you have any idea how to solve this issue?
Regards,
Maciej.