after connect not browsing

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
scorpoin
OpenVpn Newbie
Posts: 17
Joined: Thu Jan 03, 2019 8:27 am

after connect not browsing

Post by scorpoin » Tue Jun 14, 2022 12:43 pm

Greetings to All,

I've just setup openvpn on my ubunut 18 machine. After successful connection , client unable to browse any thing.

Server_Conf

Code: Select all

#File-Configuration
port 8800
proto udp
dev tun
ca    /etc/openvpn/ca.crt
cert /etc/openvpn/server.crt
key /etc/openvpn/server.key
dh /etc/openvpn/dh.pem
server 10.10.10.0 255.255.255.0
mode server
push "redirect-gateway def1"
push "dhcp-option DNS 208.67.220.220"
push "dhcp-option DNS 208.67.222.222"
#push "dhcp-option DNS 8.8.4.4"
#push "dhcp-option DNS 8.8.8.8"
##client-config-dir /etc/openvpn/ccd # for fixed ip assigning for client
##ifconfig-pool-persist /etc/openvpn/ipp.txt #log previous ip of cliemt
tls-auth ta.key 0 # This file is secret
auth SHA256
key-direction 0
cipher AES-256-CBC
client-to-client
#duplicate-cn
keepalive 10 120
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
status /var/log/openvpn-status.log
log /var/log/openvpn.log
verb 4
mute 20
Client_Base_Conf

Code: Select all

client
dev tun
proto udp
remote  x.x.x.x 8800 #This is serve IP
resolv-retry infinite
nobind
persist-key
persist-tun
cipher AES-256-CBC
auth SHA256
remote-cert-tls server
key-direction 1
comp-lzo
auth-nocache
verb 3
Firewall

Code: Select all

#!/bin/bash
#Flush_Rules
iptables -t nat -F
#Flush_All_Rules
iptables -F
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -i eth0 -o tun0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i tun0 -o eth0 -j ACCEPT
iptables -A INPUT -p udp --dport 8800 -j ACCEPT
iptables -A INPUT -p tcp --dport 10022 -j ACCEPT
iptables -A INPUT -i tun0 -j ACCEPT
iptables -A OUTPUT -o tun0 -j ACCEPT
Any idea what's wrong with it.
Last edited by scorpoin on Wed Jun 15, 2022 5:19 am, edited 2 times in total.

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: after connect not browsing

Post by TinCanTech » Tue Jun 14, 2022 5:38 pm

Is your network interface really called eth0 ?

scorpoin
OpenVpn Newbie
Posts: 17
Joined: Thu Jan 03, 2019 8:27 am

Re: [Solved]after connect not browsing

Post by scorpoin » Wed Jun 15, 2022 3:47 am

I was so stupid :/ , forgot to enable packet forwarding int

Code: Select all

/etc/sysctl.conf
net.ipv4.ip_forward=1
edit above file and removed # to enable

Code: Select all

net.ipv4.ip_forward=1
ipv4 forwarding.

Regards

scorpoin
OpenVpn Newbie
Posts: 17
Joined: Thu Jan 03, 2019 8:27 am

Re: after connect not browsing

Post by scorpoin » Wed Jun 15, 2022 5:21 am

well things seem to be not perfect yet.

Code: Select all

2022-06-15 10:09:16 net_addr_ptp_v4_add: 10.10.10.6 peer 10.10.10.5 dev tun0
2022-06-15 10:09:16 net_route_v4_add: x.x.x.x/32 via 172.16.16.1 dev [NULL] table 0 metric -1
2022-06-15 10:09:16 net_route_v4_add: 0.0.0.0/1 via 10.10.10.5 dev [NULL] table 0 metric -1
2022-06-15 10:09:16 net_route_v4_add: 128.0.0.0/1 via 10.10.10.5 dev [NULL] table 0 metric -1
2022-06-15 10:09:16 net_route_v4_add: 10.10.10.0/24 via 10.10.10.5 dev [NULL] table 0 metric -1
After successful connect I see above log dev NULL table 0 I dont get it . I have done enabling ipv4 forward as well but it stoped browsing or slow down . I dont know what's wrong with configuration , is there any other log I should look into it.

Regards

Post Reply