[DIY] How To Create Your Own 4G Proxy

I'm using Huawei , btw it shows at eth1 and not usb0 like the example

You have configured it wrong

in the 3proxy file change to: 192.168.8.100 -> 192.168.0.100 is for ZTE

also change what you had to this:

sudo ip route add 192.168.8.0/24 dev eth1 table src 192.168.8.100 gw1
sudo ip route add default via 192.168.8.1 dev eth1 table gw1
sudo ip rule add from 192.168.8.100/32 table gw1
sudo ip rule add to 192.168.8.100/32 table gw1

You use: 192.168.8.1 because when you enter that in your adress bar when the dongle is conencted it will open the interface of the dongle thats why you use 192.168.8.1 instead of 192.168.0.1 (ZTE)

Should be working now.
 
thanks for this excellent sharing I think many people will see the need for this.
 
there is possibility to do it, but you need to hire someone to create that code for you or try it your self :p
I know how to code bro - it's just that I didn't touch Linux and C for a while (since uni lol).
I now do stuff mainly in node and react but I can handle the tech stuff, just if it's possible please point me to the part in code that does the rotation (and maybe some relevant tutorials :) )
 
i am lost in this part since days :(
"If you type ifconfig your “usb0” should pop-up – that’s your dongle with the sim."
because
 
Hi,

I've been struggling with the routing configuration for a week and I don't understand why
My proxy works for my devices in my LAN, no problem with that

But for the WAN request (NAT on my router is working) the internal interface receive the paquet (from what i see on a tcpdump), but my proxy doesn't react to it at all
For the external interface it seems that the request is still sent to the target, but since my proxy isn't reacting at all the request overall isn't working
I've check, my firewalling iptables are all in "accept" mode, and i've tried nearly everything, my proxy doesn't accept request when it's sent from the router forwarding rule.
I don't think the router is the problem bc for example apache services it works well and as I said I still receive the request on the internal interface
My 3proxy.cfg allow * and auth is state as "none"

Maybe it has to see with the rt_tables but since I've do the same as it was said in the tuto, idk
 
I just found out what was the problem, i'm sharing it there because it could help someone

I don't know why but my home router was accessing my internal address of my rasp via a public IP and not via the LAN gateway. So after telling the rasp to use eth1/usb0 to access public IP the packet was doing : Src -> home router -> LAN interface of rasp -> proxy/external int of rasp -> target website -> ext int of rasp and then instead on going back to the internal interface it was trying to access my router via its public address

So you should create a route like : ip route add X.X.X.0/24 dev name_Lan_Interface scope link src addr_Lan_Interface (with X the network where is the public ip of your router)
 
Can I use only the LTE dongle as receiver and sender without using any home router?
I want to access the raspberry without any home router

Thanks
 
Last edited:
Can I use only the LTE dongle as receiver and sender without using any home router?
I want to access the raspberry without any home router

Thanks
I can link the dynamic IP address of the mobile connection through a DDNS service and access the proxy server through it. Correct?
 
Instead of buying multiple Raspberry Pi, Can I create multiple Linux VM's using VirtualBox and run 1 proxy from every VM and thus running multiple proxies from single PC?
 
Last edited:
I really need it but it's not for me, I keep reading but don't understand anything
 
Can I use only the LTE dongle as receiver and sender without using any home router?
I want to access the raspberry without any home router

in my script it is possible, so yeah, the system has no WIFI\Ethernet and exposes proxy ports via 4g only.
Also you can use something like OpenMTCP linux kernel, which automatically detects all possible default routes (not just a single one with lower metric) and therefore OS can establish and maintain a TCP tunnel via all of the dongles. If one fails, it is switched to another.

I can link the dynamic IP address of the mobile connection through a DDNS service and access the proxy server through it. Correct?
No, 4g operators don't allow incoming connection, UNLESS in some cases Ipv6 may be allowed, + the modem has to be in CDC mode, or setup a DMZ on the modem.

Instead of buying multiple Raspberry Pi, Can I create multiple Linux VM's using VirtualBox and run 1 proxy from every VM and thus running multiple proxies from single PC?

On a Raspberry , you can run up to 5 dongles (roughly; in theory), it depends on how aggresively they are used. Don't forget about setting RPI's max_usb_current=1

are you in USA? which provider you using for data plan?

some USA providers are very greedy and they can detect a modem by its IMEI and they have very limited & expensive options for devices which are not smartphones. I found a solution, by using Quectel modems (EC25, EP06), which support IMEI change so you can set an arbitrary IMEI of a smartphone.

1GB will work but i would suggest 4GB

CPU is more essential than memory. Anything above 2GB is enough.
 
some USA providers are very greedy and they can detect a modem by its IMEI and they have very limited & expensive options for devices which are not smartphones. I found a solution, by using Quectel modems (EC25, EP06), which support IMEI change so you can set an arbitrary IMEI of a smartphone.



CPU is more essential than memory. Anything above 2GB is enough.

1GB is more than enough.. and since you are putting "in my script" in bold letters seems like you trying to sell something.. :)
 
hello, thanks for the share. I'm going to try setting this up now. I have got my equipment listed in this thread. However, just posting here to see if theres anyone who have already created this setup successfully and is available to help? My target is to create multiple proxies and ability to rotate them via API or reset key request.
 
Hello guys, thanks (to the real authors) for this info.

Got a question though. I've read through the pages but still can't understand the need for a Raspberry.

If I'm going to buy a dongle, can't I just connect it directly to the computer and use it's 4g connection? Why do I need a Raspberry for?
 
Back
Top