Skip to content

ch8/ch8-mget freezes on polling state=Request is_active=true may_send=false can_recv=false may_recv=false #112

@igavrysh

Description

@igavrysh

Solution outlined here: #105,

If you are using linux (kde neon 5.27), add two lines in tap-rust creation script:

sudo iptables -A FORWARD -i tap-rust -s 192.168.42.100/24 -j ACCEPT
sudo iptables -A FORWARD -o tap-rust -d 192.168.42.100/24 -j ACCEPT

The whole file:

# to create TAP device
sudo \
    ip tuntap \
        add \
        mode tap \
        name tap-rust \
        user $USER

# to confirm that tap-rust device was added
# ip tuntap list

# allocate IP address for TAP and tell system to forward packets to it

# establish a network device called tap-rust and activates it
sudo ip link set tap-rust up

# assigns the IP address 192.168.42.100 to the device
sudo ip addr add 192.168.42.100/24 dev tap-rust

# enables internet packets to reach the source IP address mask (-s 192.168.42.100/24)
# by appending a rule (-A POSTROUTING)  that dynamically maps IP addresses to a device 
# (-j MASQUERADE)
sudo iptables \
    -t nat\
    -A POSTROUTING \
    -s 192.168.42.0/24 \
    -j MASQUERADE

# instructs the kernel to enable IPv4 packet forwarding
sudo sysctl net.ipv4.ip_forward=1

# Some distros have a default policy of DROP. This allows the traffic.
sudo iptables -A FORWARD -i tap-rust -s 192.168.42.100/24 -j ACCEPT
sudo iptables -A FORWARD -o tap-rust -d 192.168.42.100/24 -j ACCEPT

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions