Solved

Firestarter porting forwarding

Posted on 2006-06-13
7
469 Views
Last Modified: 2012-05-05
Hi experts,

I'm using firestarter (on Debian Sarge) to do internet sharing in my network. Now I have a web application running on a Windows machine (in LAN) and I want to allow user to access it via internet.

So I configure port forwarding using firestarter. I created a forward service under "inbound traffic policy" according to firestarter manual but it doesn't seem to be forwarding. When I try to connect from another machine (outside my LAN) using my Debian machine's live IP, it fails. However, I'm able to access the app if I run from a LAN PC using the LAN IP.

This is what I get with "iptables -t nat -L", I'm trying to forward port 9909 to my internal IP.

Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination
DNAT       tcp  --  anywhere             anywhere            tcp dpt:9909 to:192.168.0.140:80
DNAT       udp  --  anywhere             anywhere            udp dpt:9909 to:192.168.0.140:80

With "iptables -L", I also see this...

Chain FORWARD (policy DROP)
target     prot opt source               destination
ACCEPT     tcp  --  anywhere             192.168.0.140       tcp dpt:www
ACCEPT     udp  --  anywhere             192.168.0.140       udp dpt:www

Is there anything I missed out or anything I should check?

Thanks!
0
Comment
Question by:yeewee64
  • 4
  • 2
7 Comments
 
LVL 14

Expert Comment

by:pablouruguay
ID: 16902800
iptables -A FORWARD -j ACCEPT -p tcp --dport 9909
iptables -t nat -A PREROUTING  -p tcp -d ServerIP --dport 9909 -j DNAT  --to 192.168.0.140:80

only replace the SERVERIP with your swerver ip and its work in my box
0
 
LVL 14

Expert Comment

by:pablouruguay
ID: 16902811
orf oyu can use anyware
iptables -t nat -A PREROUTING  -p tcp --dport 9909 -j DNAT  --to 192.168.0.140:80
0
 
LVL 14

Expert Comment

by:pablouruguay
ID: 16902821
remeber in your firewall need to accept connections to 9909

iptables -A FORWARD -j ACCEPT -p tcp --dport 9909
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

Author Comment

by:yeewee64
ID: 16908924
hi pablouruguay, thanks for your response. I've followed what you've suggested but I'm still getting the same error.

From my observation, traffic to the port is still not being forward because there's nothing in my webserver accesslog and errorlog when I try to connect from my browser.

Is there something else I need to check?
0
 
LVL 16

Accepted Solution

by:
Blaz earned 250 total points
ID: 16909458
> remeber in your firewall need to accept connections to 9909
> iptables -A FORWARD -j ACCEPT -p tcp --dport 9909

Actually this is not true - you only need to accept connections to port 80 - DNAT is done before forward filtering is done.

Are the listed forward rules the only forward rules you have. Are you sure that reverse traffic passes the firewall? If not add:
iptables -A FORWARD -s 192.168.0.140 -p tcp --sport 80 -j ACCEPT

On the windows server what is the setting for gateway? If it is not the firestarter box you should add:
iptables -t nat -A POSTROUTING  -p tcp -d 192.168.0.140 --dport 80 -j SNAT  --to Firewall_internal_IP

If all this does not work, you should add some logging rules:
iptables -A FORWARD -j LOG

Then the messages log file will give you some idea what packets are beeing denied to pass through the FORWARD chain.
0
 
LVL 14

Expert Comment

by:pablouruguay
ID: 16910899
ouch sorry Blaz have reason need to accept port 80
0
 

Author Comment

by:yeewee64
ID: 16910991
Thanks Blaz! Finally it's running :D

"On the windows server what is the setting for gateway? If it is not the firestarter box you should add:
iptables -t nat -A POSTROUTING  -p tcp -d 192.168.0.140 --dport 80 -j SNAT  --to Firewall_internal_IP"

I guess this is the key. It works beautifully right after I added that. Again, many thanks!
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question