1

hi i have recently set up a raspberry pi to be a network bridge for my router to my room as i thought it would be quicker to do than wait for the delivery of a plug in network adapter in this lock down.

this has proved fairly easy and i have connected the pi wirelessly to my router on the wlan0 interface which ive set on my routers DHCP settings to have a static ip of 192.168.0.50. using some iptables edits on the pi this is being forwarded to the eth0 interface (static ip of 192.168.2.1) on my pi with my PC connected to it via Ethernet and normal data is moving fine over the connection.

I now want to connect my pc to a vpn and have been struggling with it ive installed the openvpn client on my pi and can connect the pi to it fine however the internet connection to my pc subsequently cant load websites .

I assume this is to do with the tun0 interface that the vpn creates and ive had a go at adding new rules to my ip tables so that it will forward the data but haven't found a working solution any help would be hugely appreciated as im really quite shit at networking and only have basic knowledge. =)

idk if this helps but this is a current overview of my iptables setup

Chain INPUT (policy ACCEPT 0 packets, 0 bytes)

pkts bytes target prot opt in out source destination



Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)

pkts bytes target prot opt in out source destination

299K 409M ACCEPT all -- wlan0 eth0 0.0.0.0/00.0.0.0/0state RELATED,ESTABLISHED

169K 14M ACCEPT all -- eth0 wlan0 0.0.0.0/00.0.0.0/0



Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)

pkts bytes target prot opt in out source destination 
7
  • On the RasPi please execute these commands and add its output to your question using edit: ip addr and ip route. Can you connect to the VPN server through the VPN tunnel on the RasPi? Can you connect through the VPN tunnel from the PC?
    – Ingo
    Commented Apr 11, 2020 at 11:08
  • i can connect to the vpn from the pi yes but not through the pc ill try the commands now Commented Apr 12, 2020 at 14:24
  • 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether b8:27:eb:94:f8:99 brd ff:ff:ff:ff:ff:ff inet 192.168.2.1/24 brd 192.168.2.255 scope global eth0 valid_lft forever preferred_lft forever inet 169.254.158.59/16 brd 169.254.255.255 scope global noprefixroute eth0 valid_lft forever preferred_lft forever inet6 fe80::7ed6:84cb:bf71:2bbb/64 scope link valid_lft forever preferred_lft forever Commented Apr 12, 2020 at 14:37
  • 3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether b8:27:eb:c1:ad:cc brd ff:ff:ff:ff:ff:ff inet 192.168.0.50/24 brd 192.168.0.255 scope global dynamic noprefixroute wlan0 valid_lft 48863sec preferred_lft 38063sec inet6 fe80::49cd:952f:a498:cdc8/64 scope link valid_lft forever preferred_lft forever Commented Apr 12, 2020 at 14:38
  • 4: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 100 link/none inet 10.8.0.106 peer 10.8.0.105/32 scope global tun0 valid_lft forever preferred_lft forever inet6 fe80::e649:1d5a:5968:e46c/64 scope link stable-privacy valid_lft forever preferred_lft forever Commented Apr 12, 2020 at 14:38

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.