Last active
          November 30, 2023 22:08 
        
      - 
      
 - 
        
Save mkopa/d8823ab80c6a7bd07b9d93edff0f34ac to your computer and use it in GitHub Desktop.  
Revisions
- 
        
mkopa revised this gist
Nov 30, 2023 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,12 +26,12 @@ On Host: sudo sysctl -w net.ipv4.ip_forward=1 sudo ip addr add 10.0.5.1/24 dev enp4s0 sudo iptables -A FORWARD -o enp4s0 -i ppp0 -s 10.0.5.0/24 -m conntrack --ctstate NEW -j ACCEPT sudo iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT sudo iptables -t nat -F POSTROUTING sudo iptables -t nat -A POSTROUTING -o enp4s0 -j MASQUERADE sudo stty -F /dev/ttyUSB0 raw  - 
        
mkopa revised this gist
Nov 30, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,7 +13,7 @@ sudo stty -F /dev/ttyUSB0 -a sudo pppd -detach /dev/ttyUSB0 19200 10.0.5.2:10.0.5.1 noauth local debug dump defaultroute nocrtscts persist maxfail 0 holdoff 1 // raspberry pi disable wifi: $ sudo rfkill block wifi && sudo ip link set wlan0 down sudo vim /etc/rc.local echo "Starting pppd..."  - 
        
mkopa revised this gist
Nov 30, 2023 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,6 +3,8 @@ On client: 1. add: nameserver 8.8.8.8 nameserver 1.1.1.1 to /etc/resolv.conf 2.  - 
        
mkopa renamed this gist
Nov 30, 2023 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. - 
        
mkopa created this gist
Nov 30, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,36 @@ On client: 1. add: nameserver 8.8.8.8 to /etc/resolv.conf 2. sudo stty -F /dev/ttyUSB0 raw sudo stty -F /dev/ttyUSB0 -a sudo pppd -detach /dev/ttyUSB0 19200 10.0.5.2:10.0.5.1 noauth local debug dump defaultroute nocrtscts persist maxfail 0 holdoff 1 // raspberry pi disable wifi: $ sudo rfkill block wifi sudo vim /etc/rc.local echo "Starting pppd..." sudo stty -F /dev/ttyUSB0 raw sudo stty -F /dev/ttyUSB0 -a sudo pppd -detach /dev/ttyUSB0 19200 10.0.5.2:10.0.5.1 noauth local debug dump defaultroute nocrtscts persist maxfail 0 holdoff 1 On Host: sudo sysctl -w net.ipv4.ip_forward=1 sudo ip addr add 10.0.5.1/24 dev enp3s0 sudo iptables -A FORWARD -o enp4s0 -i ppp0 -s 10.0.5.0/24 -m conntrack --ctstate NEW -j ACCEPT sudo iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT sudo iptables -t nat -F POSTROUTING sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE sudo stty -F /dev/ttyUSB0 raw sudo pppd /dev/ttyUSB0 19200 10.0.5.1:10.0.5.2 proxyarp local noauth debug nodetach dump nocrtscts passive persist maxfail 0 holdoff 1