dslreports logo
 
    All Forums Hot Topics Gallery
spc
Search similar:


uniqs
1633

timcuth
Braves Fan
Premium Member
join:2000-09-18
Pelham, AL
Technicolor ET2251

2 edits

timcuth

Premium Member

[ipv6] [Solved] IPv6-specific firewall rule

I created a firewall rule for my ssh server: "ufw allow xxxx/tcp", where xxxx is the port number of my ssh server. It worked just fine for IPv4 and IPv6, but it allowed access from anywhere.

I wanted access to be allowed only within my LAN. So, "ufw allow from 192.168.1.0/24 proto tcp to any port xxxx" worked just fine for IPv4, but it does not handle IPv6.

How would I do an analogous command for IPv6? Would it be something like "ufw allow from aaaa:bbbb:cccc:dddd::/64 proto tcp to any port xxxx"? Or something else entirely?

Tim

PS - If you speculate that I am completely ignorant about this subject, you wouldn't be far wrong.

Cabal
Premium Member
join:2007-01-21

1 recommendation

Cabal

Premium Member

Re: [ipv6] IPv6-specific firewall rule

That is correct*, assuming you're working with a /64, and not something larger and want to include it (/48 from HE.net, etc). You are most likely working with a /64, though.

* I don't know anything about ufw syntax, but that's how you'd do it any firewall I'm familiar with.

timcuth
Braves Fan
Premium Member
join:2000-09-18
Pelham, AL

timcuth

Premium Member

Thank you very much, Cabal See Profile.

Tim