Guilsson G
2013-Sep-19 02:54 UTC
DNAT from external to a internal device which doesn''t have default gateway
I need to access externally (via Internet) one device in internal network which has no default gateway configured. As the device doesn''t have default gateway, the response to SYN (ie, SYN/ACK) don''t come back to Internet. What I need is a setup to make this connection appears to come from firewall''s internal IP address instead of the public IP of originating requester (SNAT). I read FAQ 2 (http://www.shorewall.net/FAQ.htm#DNS-DNAT) for a similar situation. It''s look like the FAQ is about accessing Internally. My need is to access Externally. In fact, I tried to implement that solution but I got confused and didn''t work. The trivial DNAT rule (which doesn''t work because the lacking of def gw at device) is: DNAT net:$SOME_SPECIFIC_EXT_IP loc:$DEV_NO_GW_SET:80 tcp 8080 The rule at FAQ says DNAT loc loc:192.168.1.5 tcp www - 130.151.100.69 where the source and destination zones are the same (!?). Do I need to use 2 DNAT rules ? Another doubt is masq entry. eth1 eth1 $FW_INTERNAL_ETH1_IP tcp 80 How can I use different ports for external (8080) and internal (80) for this setup ? Thanks everybody ! ------------------------------------------------------------------------------ LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99! 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk