Re: How to do a "double" NAT ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

David Balažic a écrit :

iptables -A FORWARD -i ppp0 -o vlan1 -j ACCEPT

This rule is too permissive. You should restrict it to source address 1.2.3.4 and to destination address 192.168.1.254 and TCP port 80.

# 1.2.3.4 is the remote IP I only allow access
iptables -t nat -A prerouting_rule -i ppp0 -p tcp -s 1.2.3.4 --dport
8085 -j DNAT --to 192.168.1.254:80

iptables -t nat -A POSTROUTING -o vlan1 -p tcp -d 192.168.1.254
--dport 80 -j SNAT --to-source 192.168.1.1

--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux