Where 192.168.42.55 is your usb0 IP from your Raspberry Pi. Now to make it all work you would need to use a tool like tcpxd on your Android phone: tcpxd 192.168.1.5:2222 192.168.42.55:22 You need to know the usb0 IP on your Raspberry Pi, once it's connected to USB tethering. Understand that once USB tethering is enabled, your phone will have two active network interfaces: wlan0 (which is your WiFi 192.168.1.x as usual) and usb0 (which is 192.168.42.x). You could forward (relay) the ports at the USB tethering subnet - usually 192.168.42.x, where 192.168.42.129 is your Android phone and the Raspberry Pi will have an interface usb0 with the IP address assigned by the Android's DHCP. But recent Raspbian versions should include a recend adb client. You might need to build adb for Raspbian yourself, which is explained here. Now you should be able to connect from your laptop (or any device on the WiFi) to 192.168.1.5:2222 and end up port-forwarded to your Raspberry Pi's ssh on port 22. Let's say your Android phone has the WiFi IP 192.168.1.5. Run this command on your Raspberry Pi: adb reverse tcp: tcp: where is the TCP port on your android phone and the TCP port on your Raspberry Pi. You can also reorder the appliances associated with inbound port forwarding by selecting Reorder when adding a rule.That should be possible and requires a reverse port forward, which can be setup with adb: *If ‘security policies’ are configured, make sure they allow the traffic specified in the port forwarding rules. It does not apply when you have ‘Allow All’ or ‘Harden’ configured. Port forwarding is used only when you have ‘stateful’ or ‘stateful+snat’ configured on interfaces. Port/range of the LAN device accessed inside your network. IP address of the LAN device accessed inside your network. If the value exceeds, 100 a warning appears. If you select Any, the Destination and Translated Ports have a default value that need to be between 0-100. Select the protocol you want to apply: UDP, TCP, ICMP, Any. Port/range of the LAN device(s) that are managed remotely. Source of the WAN device managing the LAN device(s) specified in the destination. This represents the process of DMZ (Demilitarized Zone). This requires LAN side private addresses to be routed on the WAN side. The LAN-side subnet with private IP addresses is allowed access through an inbound port forwarding rule (defined by you in the following steps) and exposes any external services. The first operating mode for inbound port forwarding is when translate mode is disabled with inbound port forwarding. Inbound Port forwarding is available in two modes when you add or edit a rule, depending on whether the translate mode is enabled or disabled. Use this tab to define the desired inbound traffic. It helps define and manage inbound traffic, remap a destination IP address and port number to an internal host, and create policies to manage branch devices from the WAN. Inbound port forwarding allows traffic from the WAN to reach computers or services within a private LAN when you have a stateful firewall. Configuration > Overlays & Security > Security > Inbound Port Forwarding
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |