Jump to content

Niceday

Active Members
  • Posts

    15
  • Joined

  • Last visited

Recent Profile Visitors

716 profile views

Niceday's Achievements

Newbie

Newbie (1/14)

  1. @reubadoob Once you have your LT running the OpenVPN client as per Darren's video, the LT doesn't point its local IP settings back to the VPS - rather the OpenVPN gateway client-side subnet settings are routed via the LT by the VPN. To get as automatic as possible, if you are happy to blanket route all 192.168.x.y and 10.w.x.y addresses via the LT (i.e. this doesn't clash with any local PC private address routing you have), you can set the OpenVPN gateway settings just once and plug the LT into any of those networks and the routing will go to all of those via the LT regardless. The assumption is that you are using your PC to get to such networks via the LT, and your PC and LT are the only 2 devices on that VPN, so why not ? It's only an issue if you clash with any routing your local PC already has to your local home networks. If that's the case, you may have to manually adjust each time. Mostly, I've found the blanket approach doesn't cause me any issues I care about. To set this, in the OpenVPN gateway user permission settings for the LT user account, add networks 10.0.0.0/8 and 192.168.0.0/16 to go via the LT and then apply those changes and click on the button to update the server with the new settings. You can also add in 172.w.x.y addresses if you want (but by default OpenVPN uses 172.27.224.0/24 for itself). If you then connect the LT to any 192.168.x.y or 10.w.x.y network, the VPN will route packets for those client subnets via the LT regardless of which one the LT is plugged into this time, so you can then reach the one you are plugged into this time from the PC without changing anything. So - plug in the LT and connect the PC to the VPN. On the PC, tracert to a 192.168 address that doesn't exist and break out of it when you start getting * responses. The output will tell you the LT VPN address. e.g. tracert 192.168.44.55 Tracing route to 192.168.44.55 over a maximum of 30 hops 1 21 ms 16 ms 17 ms 172.27.224.1 2 32 ms 31 ms 29 ms 172.27.224.7 3 * ^C which tells you the LT VPN address is 172.27.224.7 That doesn't actually tell you which client-side IP address/subnet you got on the LT this time. You can get this using the plink program included with putty. Create a text file (e.g. ifconfig.txt) on the PC with the following 1 line in it: ifconfig eth1 | grep -i "inet ad" then run the following command from your PC (obviously change the LT address to the one you just found and use your own LT password) to see the desired output: plink.exe -ssh root@172.27.224.7 -pw xxxxxx -m c:\data\putty\ifconfig.txt inet addr:192.168.1.17 Bcast:192.168.1.255 Mask:255.255.255.0 This tells you the LT client-side address is currently 192.168.1.17 in a class C subnet. As before, if you want to get to all parts of a multi-subnet setup, routes would be needed in the LT also (not needed if its just the one network). That will need a script to grab the default gateway your connection was given and create routing entries to go via that address. You can invoke that script at startup via /etc/rc.local entries or you could run a scheduled task to run a script every so often. If you don't want to modify the LT, you could use plink files/commands to set it up, but that isn't automatic. Again, hope that helps.
  2. Hi, To get the address of the network you are plugged into via the ethernet cable, you can use the "ip addr show" command and pipe it through some utilities. For example: ip addr show dev eth1|grep -i "inet "|tr -s " "|cut -f 3 -d " " the first part (ip addr show dev eth1) will get you something like: 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000 link/ether 00:13:37:a6:58:2d brd ff:ff:ff:ff:ff:ff inet 192.168.1.19/24 brd 192.168.1.255 scope global eth1 valid_lft forever preferred_lft forever inet6 fe80::213:37ff:fea6:582d/64 scope link valid_lft forever preferred_lft forever piping this into grep to grab just the line with "inet " in it gets you: inet 192.168.1.19/24 brd 192.168.1.255 scope global eth1 note the leading spaces. Then pipe that into translate (tr) to squeeze (-s) the spaces (" ") together to get: inet 192.168.1.19/24 brd 192.168.1.255 scope global eth1 and finally pipe to cut to pick out field 3 (-f 3) the fields being separated/delimited by spaces (-d " ") to get: 192.168.1.19/24 you can put this into a variable to use later by wrapping up that line as commands to run and assign the output. For example: eth1addr=$(ip addr show dev eth1|grep -i "inet "|tr -s " "|cut -f 3 -d " ") echo $eth1addr to get the result: 192.168.1.19/24 Now you know the IP range you are plugged into, go to your VPS and ensure the range is in the list of networks your LT is acting as a gateway for, as per Darren's video. If you wanted to get at other networks via the eth1 connection (i.e. if it is not just a single flat 1 subnet setup), you would need to add routing entries on the turtle to tell it how to get at them, and let the VPS know those also. hope that helps.
  3. I download the zip sporadically as I try different ideas and each idea may use different tools (pineapple, VPS, VPN, BB, turtle, etc.) individually or in conjunction. So I find it easy to miss updates if not concentrating on BB. Auto download and manual implement is perfect, especially with firmware updates that may break some scripts.
×
×
  • Create New...