This guide shares a Linux host's internet connection with a PAX A35 terminal over USB, so the terminal can reach Market Pay through the host. The examples use Ubuntu; the commands apply to any Debian-based distribution. For the overall picture — topology, ports, and the terminal-side setup — start with Connect your terminal to your POS.
Note
The terminal must already be switched to USB-PC (RNDIS reverse) mode. If you haven't done that, follow Configure the terminal for USB in Connect your terminal to your POS first. Run all the commands below with sudo or as root.
Phase 1 — Prepare the connection
Step 1 — Identify the interfaces
Connect the A35 to the host by USB. Run ifconfig and note two interfaces:
usb0— the new virtual NIC that bridges to the A35.- Your active internet interface — for example
wlp0s20f3for Wi-Fi, or aneth*/enp*name for wired.
Warning
Interface names vary by machine. wlp0s20f3 is only an example. Substitute the real name of the interface that has internet access wherever it appears below.
Step 2 — Disable auto-connect on the USB interface
In the Ubuntu desktop, stop NetworkManager from managing the USB link so it doesn't fight your manual configuration:
- Open Wired Settings for the USB virtual connection.
- Turn off Connect automatically.
- Apply the change, then drive the interface from the terminal with the commands below.
Phase 2 — Configure network routing
Step 3 — Enable IP forwarding
Let the host route traffic between interfaces:
sysctl -w net.ipv4.ip_forward=1Step 4 — Configure NAT with iptables
Masquerade the terminal's traffic behind your internet interface. Replace wlp0s20f3 with the interface that has internet access:
iptables -t nat -A POSTROUTING -o wlp0s20f3 -j MASQUERADEStep 5 — Assign the USB interface IP
Give usb0 the gateway address the terminal routes through:
ifconfig usb0 192.168.42.1This 192.168.42.1 must match the gateway you set on the terminal, so the A35 (default 192.168.42.129) can route its traffic through the host.
Command summary
| Action | Command |
|---|---|
| Verify interface | ifconfig usb0 |
| Enable forwarding | sysctl -w net.ipv4.ip_forward=1 |
| Configure NAT | iptables -t nat -A POSTROUTING -o <internet-if> -j MASQUERADE |
| Assign host IP | ifconfig usb0 192.168.42.1 |
Note
The sysctl, iptables, and ifconfig commands are runtime-only and are lost on reboot. To persist them, add a static block to /etc/network/interfaces (or a systemd/startup script), and set net.ipv4.ip_forward=1 in /etc/sysctl.conf.
Verify the connection
Once the host is configured, confirm the terminal has internet from the Pay On Site Diagnosis screen — see Verify connectivity in the main guide.
Next steps
- Back to the overview — Connect your terminal to your POS.
- Configure the terminal's IP and firewall access — Configure your network.