# unable to access site with specific port



## lezde716 (Sep 7, 2011)

My FreeBSD machine serves as a transparent proxy, since it is a proxy all traffic in http is forwarded to port 3128 which is defined as a transparent proxy port. 

My problem now is I'm not able to access a site with specific port like remote managing the router with port 8080 or accessing mobile application with port 9030.

Anybody can help me about this matter. Thank you.


----------



## SirDice (Sep 7, 2011)

Please post your firewall configuration.


----------



## DutchDaemon (Sep 7, 2011)

"All traffic in http" does not mean a lot. Traffic redirecting is done on ports, not protocols. As it stands now, you're probably only redirecting outbound traffic to port 80. So you should redirect http traffic to router:8080 and mobileapp:9030 to proxy:3128 as well.


----------



## lezde716 (Sep 10, 2011)

```
# Loopback Address
${fwcmd} 00100 allow all from any to any via lo0
${fwcmd} 00101 allow all from any to any via lo0
${fwcmd} 00102 deny all from any to 127.0.0.0/8
${fwcmd} 00103 deny ip from 127.0.0.0/8 to any

# NATD Rules
${fwcmd} 00200 divert natd ip4 from any to any via ${ext_if}

# Port Forwarding Squid Transparent Proxy
[B]${fwcmd} 00202 fwd ${ext_ip},3128 tcp from any to any 80 in recv ${int_if}[/B]

# Statefull
${fwcmd} 00203 check-state
${fwcmd} 00204 deny all from any to any frag
${fwcmd} 00205 allow all from any to any out keep-state

[B]# Allow Access to WWW
${fwcmd} 00601 allow tcp from any to me 80 
${fwcmd} 00602 allow tcp from any to any 80 
${fwcmd} 00603 allow tcp from any to me 443 
${fwcmd} 00604 allow tcp from any to any 443 
${fwcmd} 00605 allow tcp from any to any 8080 [/B]

# Allow mobile application
[B]${fwcmd} 00708 allow ip from any to any 9030[/B]
```
This is my firewall rules.


----------

