Results 1 to 3 of 3

Thread: iptables3416 days old

  1. #1
    nickel’s worth of dreams Walden's Avatar
    Join Date
    May 2003
    Location
    Kzoo
    Posts
    1,125
    Threads
    118

    Awards Showcase

    Local Date
    05-25-2013
    Local Time
    08:18 AM

    iptables

    How can i just poke a hole for a port, so it can use any traffic.

    For instance I want to do this:

    iptables -I INPUT --sport 123 -j ACCEPT

    yeah why won't that work, i want all traffic to come and go on port 123

    So if you find someone
    Someone to have, someone to hold
    Don't trade it for silver
    Don't trade it for gold

  2. #2
    Hell's Very Own Grogan's Avatar
    Join Date
    Sep 2002
    Location
    Ontario, Canada
    Posts
    23,111
    Threads
    2409

    Awards Showcase

    Real Name
    Hugh Jorgen
    Local Date
    05-25-2013
    Local Time
    08:18 AM
    I should think you'll want to use --dport (--destination-port) for that rule (since it's input... incoming destination). You also may need to have a rule for the OUTPUT chain, using --sport

    iptables -I INPUT --destination-port 123 -j ACCEPT
    iptables -I OUTPUT --source-port 123 -j ACCEPT

    I haven't a clue about your firewall though and how the rulechains are set up but if those commands are issued after all the others, they should override for that port.

  3. #3
    nickel’s worth of dreams Walden's Avatar
    Join Date
    May 2003
    Location
    Kzoo
    Posts
    1,125
    Threads
    118

    Awards Showcase

    Local Date
    05-25-2013
    Local Time
    08:18 AM

    ah, i have to spell it out, i get yeah. I have my firewall blocking everything from coming in, so i'm not too worried about things getting out.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •