[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to offer Internet connection?



you can connect your PC with usb cable to the phone.
on your smartphone you need to enabling "sharing by usb"
and your smartphone will become router and dhcpd server for your PC.

on your pc, you will have usb0 interface (with 0 can be more), or unpredictable interface name like enxxxxxxxxx.

but...

if you realy want use one of your pc like a router, you need to activate "net.ipv4.ip_forward = 1" in /etc/sysctl.conf
and many time you will want nat from your local networt to Internet.

so, you will 
 - define statics IP and adding routes, or 
 - configure a dhcpd server 

nat routing:
iptables -A POSTROUTING -s {{base_ip}}.{{client_network}}/{{masque}} -j MASQUERADE

replace {{base_ip}}.{{client_network}}/{{masque}} with your values (yes it may become little bit complicated)

(some time, I think using babeld is simpler...)

I am sure I omit some pieces to your configuration


Reply to: