*nix Thread, iptables settings in Technical; We have configured Squid 3.3.8 on Ubuntu 13.10. Squid all seems ok, but we've come a little stuck on the ...
12th February 2014, 01:39 PM #1
We have configured Squid 3.3.8 on Ubuntu 13.10. Squid all seems ok, but we've come a little stuck on the iptables settings.
We want to basically forward all requests from our BYOD range (18.104.22.168) on eth0, onto eth1 (192.168.3.108) out to the internet.
Currently this is our /etc/iptables.up.rules config:
But it doesn't seem to work - the clients get 'No DNS records' error which makes me think the traffic isn't being forwarded from Squid (22.214.171.124) onto the LAN-facing NIC (192.168.3.108)
iptables -t nat -F
iptables -t nat -X
iptables -t manlge -F
iptables -t mangle -X
iptables -A PREROUTING -m tcp -p tcp --src 126.96.36.199/21 --sport 80 --dst 188.8.131.52 --dport 3128 -j ACCEPT
iptables -A PREROUTING -m udp -p udp --src 184.108.40.206/21 --sport 80 --dst 220.127.116.11 --dport 3128 -j ACCEPT
iptables -A FORWARD -m tcp -p tcp --src 18.104.22.168 --sport 3128 --dst 192.168.3.108 --dport 80 -j ACCEPT
iptables -A FORWARD -m udp -p udp --src 22.214.171.124 --sport 3128 --dst 192.168.3.108 --dport 80 -j ACCEPT
Not sure what we're doing wrong - probably missing something obvious!
13th February 2014, 11:23 AM #2
- Rep Power
Not an expert on iptables. You might find it easier to use shorewall to configure and manage iptables. Thats what I did on my Ubuntu/Squid server. Bit easier to see whats going on.
13th February 2014, 11:29 AM #3
Try adding a line with UPD port 53 with a destination to your DNS server.
This might be of use.
25 Most Frequently Used Linux IPTables Rules Examples
13th February 2014, 11:52 AM #4
The lazy admins method of configuring iptables is to use Guarddog or similar.
13th February 2014, 03:43 PM #5
Looking into GUIs at the moment, currently using firestarter and got much further using it than manually configuring iptables.up.rules got a connection refused error now.
Originally Posted by unixman_again
Last Post: 9th November 2005, 02:54 PM
Last Post: 16th September 2005, 09:07 AM
By tosca925 in forum Windows
Last Post: 26th August 2005, 04:49 PM
By ninjabeaver in forum Windows
Last Post: 23rd August 2005, 06:55 PM
Last Post: 9th August 2005, 12:25 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)