![]() |
Debian Squeeze NAT not working
I have a small home network with mixed Linux and Windows computers, I am trying to set up a Debian server (HP DL560 G1).
I have the following setup: eth0: Internal network (10.0.0.1/8) eth1: Physical interface for ppp0 ppp0: DHCP WAN uname -a: Code:
Linux main-server 2.6.32-5-686-bigmem #1 SMP Mon Jan 16 16:42:05 UTC 2012 i686 GNU/LinuxI have squidProxy runing on port 3128 and currently providing access to the internet for the network. However there are some issues with a proxy in general that creates problems (Android doesn't support them without rooting, Flash doesn't necessarily support it, Windows won't remember passwords). I have Googled many different variations of 'configure nat debian squeeze' nad tried nearly every tutorial and read through enourmous amounts of documentation, and the server still won't provide NAT services. I use iptables for firewalling purposes, and wrote a script to set it up on every boot. The script is called from a custom init script. Code:
#!/bin/bashAny ideas, help, or suggestions would be greatly appreciated. If more info is needed just let me know. |
Well first of all If you ask me try to disable squid and try to flus all your rules "iptables -F", set INPUT,FORWARD,OUTPUT chains to ACCEPT and add iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE and than try to connect from win hosts to internet. If it doesn't work than check if iptable_nat is loaded in the kernel. To check you can issue following command /sbin/lsmod |grep table. If everything works fine than you should add your rules one by one and see what's causing the problem. I alos recommend that you put in each chain LOG target for all blocked traffic so you can inspect in /var/log/messages and /var/log/syslog which traffic is blocked and than make rules for allowing it if it must pass through.
|
I tried everything you suggested, iptable_nat is loaded, and using the LOG target doesn't generate anything that (to me anyways) indicates that I'm even trying to access the internet. I also tried shutting down Apache as I wasn't sure if that would cause problems. Anyways, no luck. if the contents of /var/log/syslog would be useful let me know and I'll post it. Also
Code:
cat /var/log/syslog | grep -i E0:CA:94:03:5A:A2 | grep -i ppp0 | wc -lCode:
0 |
post output of iptables -L. You can't access internet from Debian or just from win clients on local lan or both?
|
If you are troubleshooting NAT, test it with ping rather than http traffic, to avoid interference of any DNS/proxy errors.
Ping 4.2.2.2 and if it doesn't work do iptables -t nat -L -v and see if the masquerade rule is getting traffic. Once you have ping connectivity, look at any proxy/dns issues on the client computers (was the proxy transparent?) |
OK, I can ping if I give the IP address however, I need to configure DNSmasq to provide DNS lookups (which are currently going to the server, but it is not providing any DNS services). So I am currently doing some research and will post back here soon.
|
Success! DNSmasq is now successfully configured and I can access the internet without a proxy.
|
Obvious mistake.
Server without DNS? It seams to be joke. I have server with: BRouter (Bridge + router) firewall (IP/IP6/ARP/EBtables) DNS DHCP proxy NTP NFS samba (S)FTP(S) (working only as SFTP or FTPS, no plain FTP supported) SSH (obvious) some minor services. For me this minimal set of services for home server. Actually I have two exactly same servers. One of them simply do not do firewalling, as it is plain bridge. Both have own IEEE802.11 Access Points with specific passphrases for specific MACs. I am planing to turn them into small cluser, but it is not for now. |
| All times are GMT -5. The time now is 05:34 PM. |