Author Topic: Direct connection bypassing the proxy  (Read 1480 times)

adassoft

  • Zen Apprentice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Direct connection bypassing the proxy
« on: May 15, 2010, 04:10:36 am »
I have the following problem: Here in Brazil, Caixa, offers a system called Social Connectivity, that every accounting office needs to make use of it.
The problem is that this system did not can go through the proxy, the connection it has to be direct.
In another sever that I used, used the following rules to iptables:

Code: [Select]
iptables -t nat -A PREROUTING -s 192.168.0.89 -d 200.201.174.0/24 -p tcp --dport 80 -j ACCEPT
iptables -t nat -A PREROUTING -d 200.201.174.202 -p tcp -m tcp --dport 80 -j DNAT --to-destination 200.201.174.202:80
iptables -t nat -A PREROUTING -d 200.201.174.203 -p tcp -m tcp --dport 80 -j DNAT --to-destination 200.201.174.203:80
iptables -t nat -A PREROUTING -d 200.201.174.204 -p tcp -m tcp --dport 80 -j DNAT --to-destination 200.201.174.204:80
iptables -t nat -A PREROUTING -d 200.201.174.205 -p tcp -m tcp --dport 80 -j DNAT --to-destination 200.201.174.205:80
iptables -t nat -A PREROUTING -d 200.201.174.206 -p tcp -m tcp --dport 80 -j DNAT --to-destination 200.201.174.206:80
iptables -t nat -A PREROUTING -d 200.201.174.207 -p tcp -m tcp --dport 80 -j DNAT --to-destination 200.201.174.207:80
iptables -t nat -A PREROUTING -d 200.201.174.208 -p tcp -m tcp --dport 80 -j DNAT --to-destination 200.201.174.208:80
iptables -t nat -A PREROUTING -d 200.201.174.209 -p tcp -m tcp --dport 80 -j DNAT --to-destination 200.201.174.209:80
iptables -t nat -I PREROUTING -i eth1 -d 200.201.174.0/24 -p tcp --dport 80 -j REDIRECT --to-port 8080
iptables -t nat -A PREROUTING -i eth1 -d www.caixa.gov.br -p tcp --dport 80 -j ACCEPT
iptables -t nat -A PREROUTING -i eth1 -d www1.caixa.gov.br -p tcp --dport 80 -j ACCEPT
iptables -t nat -A PREROUTING -i eth1 -d cmt.caixa.gov.br -p tcp --dport 80 -j ACCEPT
iptables -t nat -A PREROUTING -i eth1 -d www.caixa.com.br -p tcp --dport 80 -j ACCEPT
iptables -t nat -I PREROUTING -d 200.201.174.207 -j ACCEPT
iptables -t nat -I PREROUTING -s 200.201.174.207 -j ACCEPT
iptables -t nat -I PREROUTING -d 200.201.169.69 -j ACCEPT
iptables -t nat -I PREROUTING -s 200.201.169.69 -j ACCEPT
iptables -t nat -I PREROUTING -d 200.201.166.240 -j ACCEPT
iptables -t nat -I PREROUTING -s 200.201.166.240 -j ACCEPT
iptables -I FORWARD -p tcp --dport 80 -s 192.168.0.0/24 -d 200.201.174.0/24 -j ACCEPT
iptables -I FORWARD -p tcp --dport 21 -d 200.201.174.207 -j ACCEPT
iptables -I FORWARD -p tcp --dport 80 -d 200.201.174.207 -j ACCEPT
iptables -I FORWARD -p tcp --dport 21 -d 200.201.169.69 -j ACCEPT
iptables -I FORWARD -p tcp --dport 80 -d 200.201.169.69 -j ACCEPT
iptables -I FORWARD -p tcp --dport 21 -d 200.201.166.240 -j ACCEPT
iptables -I FORWARD -p tcp --dport 80 -d 200.201.166.240 -j ACCEPT
iptables -I FORWARD -p tcp --dport 20001:20005 -s 200.201.169.69 -j ACCEPT
iptables -I FORWARD -p tcp --dport 20000:20019 -d 200.201.169.69 -j ACCEPT
iptables -I FORWARD -p tcp --dport 20001:20005 -s 200.201.166.240 -j ACCEPT
iptables -I FORWARD -p tcp --dport 20000:20019 -d 200.201.166.240 -j ACCEPT
iptables -I FORWARD -p tcp --dport 20001:20005 -s 200.201.174.207 -j ACCEPT
iptables -I FORWARD -p tcp --dport 20000:20019 -d 200.201.174.207 -j ACCEPT
iptables -I FORWARD -p tcp -s 200.201.174.207 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -I FORWARD -p tcp -s 200.201.169.69 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -I FORWARD -p tcp -s 200.201.166.240 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -i eth0 -p udp -s 200.201.174.207 -j ACCEPT
iptables -A INPUT -i eth1 -p udp -s 200.201.174.207 -j ACCEPT
iptables -A INPUT -i eth0 -p udp -s 200.201.169.69 -j ACCEPT
iptables -A INPUT -i eth1 -p udp -s 200.201.169.69 -j ACCEPT
iptables -A INPUT -i eth0 -p udp -s 200.201.166.240 -j ACCEPT
iptables -A INPUT -i eth1 -p udp -s 200.201.166.240 -j ACCEPT
iptables -A OUTPUT -p tcp --destination-port 2631:2631 -j ACCEPT
iptables -A INPUT -p tcp --destination-port 2631:2631 -j ACCEPT
 
 
 
#### Passes out of the Proxy ####
 
iptables -t nat -I tproxy -d 200.201.166.200 -j RETURN
iptables -t nat -I tproxy -d 200.201.166.240 -j RETURN
iptables -t nat -I tproxy -d 200.201.169.69 -j RETURN
iptables -t nat -I tproxy -d 200.201.173.0/24 -j RETURN
iptables -t nat -I tproxy -d 200.201.173.68 -j RETURN
iptables -t nat -I tproxy -d 200.201.174.0/24 -j RETURN
iptables -t nat -I tproxy -d 200.201.174.204 -j RETURN
iptables -t nat -I tproxy -d 200.201.174.207 -j RETURN

These rules run into the eBox?
Where should I put them?


muppetgeoff

  • Zen Apprentice
  • *
  • Posts: 38
  • Karma: +0/-0
    • View Profile
Re: Direct connection bypassing the proxy
« Reply #1 on: May 16, 2010, 04:36:12 am »
Hi,

Check my post here:

http://forum.ebox-platform.com/index.php?topic=3684.0

Kind regards,

Geoff