Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Open
igavrysh opened this issue Jun 30, 2023 · 0 comments

Comments

@igavrysh
Copy link

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
@igavrysh igavrysh changed the title ch8/ch8-mget freezes on ch8/ch8-mget freezes on polling Request state is_active: true, may_send: false, can_recv: false, may_recv: false Jun 30, 2023
@igavrysh igavrysh changed the title ch8/ch8-mget freezes on polling Request state is_active: true, may_send: false, can_recv: false, may_recv: false ch8/ch8-mget freezes on polling Request state. is_active: true, may_send: false, can_recv: false, may_recv: false Jun 30, 2023
@igavrysh igavrysh changed the title ch8/ch8-mget freezes on polling Request state. is_active: true, may_send: false, can_recv: false, may_recv: false ch8/ch8-mget freezes on polling Request state is_active=true may_send=false can_recv=false may_recv=false Jun 30, 2023
@igavrysh igavrysh changed the title ch8/ch8-mget freezes on polling Request state is_active=true may_send=false can_recv=false may_recv=false ch8/ch8-mget freezes on polling state=Request is_active=true may_send=false can_recv=false may_recv=false Jun 30, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant