I want to open up a port on my iptables router to allow a connection from
WAN to a specific machine on my LAN (called A). I also want this port to be
accessible from all machines in the LAN to WAN. At the moment my script
allows incoming and outgoing connections on the port to or from A. How can
I modify this to allow outgoing connections on this port from all machines
in the LAN? My script is:
iptables -t nat -I PREROUTING -p tcp -s ! 192.168.0.1 --dport 12345 -j
DNAT --to 192.168.0.1
iptables -I FORWARD -p tcp -d 192.168.0.1 --dport 12345 -j ACCEPT
Thanks
Allan
|