LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-15-2014, 10:56 PM   #1
psycroptic
Member
 
Registered: Aug 2011
Location: USA
Distribution: ArchLinux - 3.0 kernel
Posts: 349

Rep: Reputation: Disabled
IPv6 firewall question - opening port on router to single v6 address


say i want to open a single tcp port 100 to a single host behind an IPv6 router. This router is providing prefix delegation to the internal LAN, and is configuring the hosts via router advertisements; its firewall is configured to DROP all incoming, NEW state traffic. What would be the iptables rule to add that would allow forwarded traffic with destination port 100 TCP to 1 host behind the router? i would think that you would allow FORWARDed traffic coming in from the external interface with a destination port of 100 to a destination link-local address of the machine in question, something like:

Code:
ip6tables -A FORWARD -i external -p tcp --dport 100 -d fe80:1111:1111::1 -j ACCEPT
but this does not work

Last edited by psycroptic; 05-15-2014 at 10:58 PM.
 
Old 05-16-2014, 04:27 AM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,349

Rep: Reputation: Disabled
The destination address in your rule is wrong. You have to use the globally routable IPv6 address, not the link-local (fe80::/16) address. Link local addresses cannot be routed, and are never valid source or destination addresses in the FORWARD chain.
 
Old 05-16-2014, 08:21 AM   #3
psycroptic
Member
 
Registered: Aug 2011
Location: USA
Distribution: ArchLinux - 3.0 kernel
Posts: 349

Original Poster
Rep: Reputation: Disabled
right, but all the LAN clients are getting DHCPv6-PD global addresses from the router, meaning that the addresses change (with Comcast PD, the prefix changes roughly once every 4 days), meaning that i would have to rewrite this rule every time it changes...
 
Old 05-16-2014, 10:41 AM   #4
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,349

Rep: Reputation: Disabled
That's obviously a deliberate strategy from Comcast to prevent people from running servers. I mean, heaven forbid you'd use your Internet connection for, well, Internet stuff.

When the local prefix changes, does that mean the external router address changes as well? In any case, it should be possible to have such a change trigger a script which could then modify and reapply the firewall rules.
 
Old 05-16-2014, 11:00 AM   #5
psycroptic
Member
 
Registered: Aug 2011
Location: USA
Distribution: ArchLinux - 3.0 kernel
Posts: 349

Original Poster
Rep: Reputation: Disabled
yeah, i suppose i could just wildcard forward port 100, with no destination address:

Code:
ip6tables -A FORWARD -i external -p tcp --dport 100 -j ACCEPT
but that seems too broad
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu Server Firewall not opening port Wnt2bsleepin Linux - Networking 5 11-08-2013 01:55 AM
Static IP address - port opening question notinthehead Linux - Networking 3 12-01-2007 05:09 PM
How to set IPv6 address on IPv6 router tlemons Linux - Networking 3 09-17-2007 01:25 PM
Opening a port on SuSe Firewall Hockeyfan Linux - Networking 2 10-29-2005 11:11 PM
opening router port andrebras Linux - Networking 3 11-06-2004 10:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration