Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
01-30-2010, 12:09 AM
|
#1
|
|
LQ Newbie
Registered: Jan 2010
Posts: 6
Rep:
|
Lost among routers, firewalls, and access points.
Would anyone please be kind enough to comment on this outrageous setup I "invented":
cable modem (dynamic ip)
|
|
router (dynamic for modem, static 192.168.1.1 internally)
|
|
debian firewall/nat/dnsmasq with dhcp (two interfaces: eth0 for router above [static 192.168.1.2]; eth1 for switch below [static 192.168.3.1])
|
|
8-port gigabit switch ---- wireless router/ access point(static 192.168.3.254) - DHCP'd laptops (not working)
|
|
static LAN computers
Would you please help me understand the following;
1) The static LAN computers work ok. They find the dnsmasq on the debian computer, and they can access each other via dns, and the internet.
2) I can also ping the wireless router/access point from any of my other computers.
3) I cannot seem to make DHCP on the debian work. If I connect a laptop via wire to the gigabit switch, it will not find the DHCP server on the debian. In fact, it will give me a strange message: pinging 192.168.1.1 from 192.168.1.2... and then that it failed.
4) I cannot make a wireless connection via the wireless router/access point. I also cannot make a wired connection from it - none at all if I configure it for DHCP. I can, however, get to 192.168.1.1 if I configure a laptop in a wired connection statically. But in neither case I can connect to the internet.
Both routers have DHCP servers disabled and static IPs assigned, so there is only one DHCP server that should be running - of dnsmasq.
Thank you for your response. The reason why I did not make the frontline router statically route packets to my debian is because I would like to keep the flexibility of adding other networks to it later if needed; and also, it was simpler to have debian have a static address on its eth0 interface, rather than a dynamic one.
Last edited by AntonGolovin; 01-30-2010 at 12:26 AM.
|
|
|
|
01-30-2010, 01:58 AM
|
#2
|
|
LQ Newbie
Registered: Jan 2010
Posts: 6
Original Poster
Rep:
|
Solved accidentally.
If anyone else is having this issue, adding this line to iptables script helped:
# enable broadcast traffic
iptables -A INPUT -i $INTIF -d 255.255.255.255 -j ACCEPT
This apparently enabled DHCP broadcast request from a laptop to reach the firewall, which is also hosting the DNS/DHCP server. This makes me wonder if this setup is recommended?
Please advise of security implications?
Anton.
Last edited by AntonGolovin; 01-30-2010 at 02:07 AM.
|
|
|
|
01-30-2010, 05:39 AM
|
#3
|
|
Moderator
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
DHCP is an extension of the BOOTP protocol. Check that port 68/udp is open on the client and 68/udp is open on the server.
Code:
Starting Nmap 5.00 ( http://nmap.org ) at 2010-01-30 05:36 CST
Warning: Hostname localhost resolves to 2 IPs. Using 127.0.0.1.
Interesting ports on localhost (127.0.0.1):
PORT STATE SERVICE
67/udp closed dhcps
68/udp open|filtered dhcpc
Nmap done: 1 IP address (1 host up) scanned in 1.28 seconds
jschiwal@qosmio:~/Documents/pdfdocs> sudo nmap -sN localhost -p 67-68
Starting Nmap 5.00 ( http://nmap.org ) at 2010-01-30 05:37 CST
Warning: Hostname localhost resolves to 2 IPs. Using 127.0.0.1.
Interesting ports on localhost (127.0.0.1):
PORT STATE SERVICE
67/tcp closed dhcps
68/tcp closed dhcpc
Nmap done: 1 IP address (1 host up) scanned in 0.07 seconds
Code:
dhcps 67/tcp 0.000013 # DHCP/Bootstrap Protocol Server
dhcps 67/udp 0.228010 # DHCP/Bootstrap Protocol Server
dhcpc 68/tcp 0.000063 # DHCP/Bootstrap Protocol Client
dhcpc 68/udp 0.140118 # DHCP/Bootstrap Protocol Client
One technique is to scan localhost on the server. Then from another computer, scan the server. Also use
netcat --inet -l
or
netcat --inet -ln
to list listening ports. Compare those with which ports are open using nmap from outside your servers firewall.
Code:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
...
udp 0 0 *:bootpc *:*
..
Some Windows clients expect a non-standard broadcast address to be 255.255.255.255 instead of 192.168.3.255 and you need to add a route to 255.255.255.255 to compensate.
You also didn't show your netmasks to see if you have the cable router and the wireless segments on different subnets.
You could maybe simply things by using the dhcp server on your wireless router instead. Unless you want to filter different clients differently for outgoing connections. For incoming requests, you need to forward a port to a particular client anyway.
Last edited by jschiwal; 01-30-2010 at 06:03 AM.
|
|
|
|
01-30-2010, 07:12 AM
|
#4
|
|
Member
Registered: Jan 2010
Posts: 37
Rep:
|
Quote:
Originally Posted by AntonGolovin
Would anyone please be kind enough to comment on this outrageous setup I "invented":
cable modem (dynamic ip)
|
|
router (dynamic for modem, static 192.168.1.1 internally)
|
|
debian firewall/nat/dnsmasq with dhcp (two interfaces: eth0 for router above [static 192.168.1.2]; eth1 for switch below [static 192.168.3.1])
|
Why do you have two routers after each other? If the first router is doing NAT (which most likely it is) the second NAT is not gone do you any good. In fact I don't understand why you don't connect your debian box directly to the cable modem.
|
|
|
|
01-30-2010, 12:25 PM
|
#5
|
|
LQ Newbie
Registered: Jan 2010
Posts: 6
Original Poster
Rep:
|
Both doing NAT, I think.
Quote:
Originally Posted by Yakideo
Why do you have two routers after each other? If the first router is doing NAT (which most likely it is) the second NAT is not gone do you any good. In fact I don't understand why you don't connect your debian box directly to the cable modem.
|
Hi, I just wanted to be able to connect other networks to the main router in the future. I wanted Debian to have a static IP (easier to configure IP tables.)
Other than than, it all works now with the addition to iptables the line in the second post. Even wireless works seamlessly.
Anton.
|
|
|
|
01-31-2010, 02:32 AM
|
#6
|
|
Moderator
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
You might want to look at peoples setups that have Internet / DMZ / Firewall zones. Wireless being less secure could be considered as the DMZ zone.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 05:53 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|