iptables - mixing ipv4 and ipv6 addresses

Issues related to configuring your network
Post Reply
Kuwarbi
Posts: 12
Joined: 2016/07/17 07:08:24

iptables - mixing ipv4 and ipv6 addresses

Post by Kuwarbi » 2016/07/17 08:48:27

How can I write iptables/ip6tables rule to accept traffic from source IPV6 and destination IPV4 or vice versa.

I want something like this, but it is getting failed:

ip6tables -A INPUT -s 10.0.2.82 -d 2001:0db8:85a3:0000:0000:8a2e:0370:7332 -p tcp --dport 2000 -j ACCEPT

iptables -A INPUT -s 2001:0db8:85a3:0000:0000:8a2e:0370:7332 -d 10.0.2.82 -p tcp --dport 2000 -j ACCEPT

How can I achieve this ???

FYI, using RHEL 6.7

forumitu
Posts: 118
Joined: 2014/02/20 14:30:51

Re: iptables - mixing ipv4 and ipv6 addresses

Post by forumitu » 2016/07/18 07:38:21

On IPv4 both the source and the destination addresses are IPv4 addresses. Exactly the same with IPv6, both the source and the destination IP addresses are IPv6.

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: iptables - mixing ipv4 and ipv6 addresses

Post by aks » 2016/07/19 18:21:39

Eh? Change protocols half way through a transmission?

Post Reply