Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Accessing internet through comitup #261

Open
wspi opened this issue Jan 31, 2025 · 4 comments
Open

Accessing internet through comitup #261

wspi opened this issue Jan 31, 2025 · 4 comments
Labels

Comments

@wspi
Copy link

wspi commented Jan 31, 2025

I usually use comitup on my raspberry pi 3 connected via ethernet cable, doing so I was wondering, is there a way to comitup detect that the wired connection is on, and turn the wifi on so users could connect to this wifi and have access to the internet?

I've connected to the hotspot ssid but it won't have access to the internet

not sure if #168 would allow this

@davesteele
Copy link
Owner

#168 is different. It suggests that Comitup should drop the hotspot if there is a wired connection.

You need two things to be able to do this - ip_forwarding needs to be enabled, and masquerading needs to be set for the wired port. Comitup does both of these things. See the rules with nft when all interfaces are up.

I replaced iptables with nft last year. I may have messed the masquerading up. Let me know if you see a problem with the rules.

@wspi
Copy link
Author

wspi commented Jan 31, 2025

I'm not familiar with nft, but I'll take a look and let you know

@wspi
Copy link
Author

wspi commented Jan 31, 2025

one thing that I've noticed is that ip_forwarding is not enabled,

# cat /proc/sys/net/ipv4/ip_forward
0

and if I'm looking at the right place, there are no nft rules

# nft list ruleset
table ip filter {
	chain COMITUP-OUT {
		type filter hook output priority 100; policy accept;
		icmp type destination-unreachable counter packets 277 bytes 153104 drop
		icmp code port-unreachable counter packets 0 bytes 0 drop
		counter packets 10799 bytes 707213 return
	}
}

also looking at the comitup-cli info

Host comitup-147.local on comitup version 1.43
'single' mode
HOTSPOT state

so I guess the single mode it's not what it should be?

@davesteele
Copy link
Owner

Marking as a bug.

@davesteele davesteele added the bug label Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants