# opening ports 67:68 to UDP traffic [4 dhcp]



## XunilNewb (Jan 13, 2005)

I'm new to Linux and even newer to networking with Linux. I’ve configured my dhcpd.conf so that it should work but I’m struggling to allow dhcp traffic through udp ports 67 & 68.
I’m using Fedora Core 1 and have tried the following two strings of commands;

#iptables -I INPUT –I eth0 –p udp –sport 67:68 –dport 67:68 –j ACCEPT

[this command resulted in a message saying you can’t use –I with -I]

#iptables -I INPUT –I $LAN_INTERFACE –p udp –dport 67:68 –sport \ 67:68 –j ACCEPT

[this command resulted in $:WARNING: weird character in interface ‘-p’ no aliases :, ! or *]

I’m very new to peeing tables so I have to take what people have suggested to me at face value, it really shouldn’t be difficult to allow udp traffic on the ports that dhcp uses though – I’m close I can smell it, wait, that’s just me.
:laugh:


----------



## Skie (Mar 15, 2003)

Would you rather be using IPChains? :wink:

Try this rule instead: 

iptables -A INPUT -p udp –sport 67 --dport 67

I'm not too familiar with IPTables, so I'm just going based on what I'm finding around the net.


----------



## XunilNewb (Jan 13, 2005)

That looks more like it, Core commands seem a lot more streamlined than other distro's, I'll try it ty again! (btw you'll probably have guessed that my "is your son a hacker?" post is a joke. I ripped it from some other site where hordes took it sooo seriously lmao. Wait, this jokes prolly a bit long in the tooth now aint it? Never mind, it's ammusement for those who haven't yet been enlightened, lol.

:smile:

P.S. peeing chains might hurt but DUDE a TABLE! :4-dontkno lol

hmn, tried it, that one spat out bad argument '67'. I'll go through -h and man and try and work it out, if I do I'll post it


----------



## Skie (Mar 15, 2003)

Here are some actual IPTable rules that I've used (given to me by someone else). The IP address is changed, but you should get the idea. These are for tcp, but udp shouldn't be much different.



> iptables -I INPUT 1 -p tcp -s 1.2.3.4 -j ACCEPT
> iptables -I OUTPUT 1 -p tcp -d 1.2.3.4 -j ACCEPT
> iptables -I INPUT 2 -p tcp --dport 1040 -j ACCEPT
> iptables -I INPUT 3 -p tcp --dport 1248 -j ACCEPT
> ...


----------

