- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Problem with iptables script
Operating System - Linux
1824721
Members
3507
Online
109674
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-25-2008 04:27 PM
тАО01-25-2008 04:27 PM
Problem with iptables script
Hi there --
I am trying to get an iptables script to run, but have run into some errors whenever I try to execute it. The error messages that are showing up on-screen are shown below:
[+] Setting up INPUT chain...
Bad argument `tcp'
Try `iptables -h' or 'iptables --help' for more information.
Bad argument `tcp'
Try `iptables -h' or 'iptables --help' for more information.
Bad argument `tcp'
Try `iptables -h' or 'iptables --help' for more information.
iptables v1.3.8: Can't use -i with OUTPUT
Try `iptables -h' or 'iptables --help' for more information.
Bad argument `5666'
Try `iptables -h' or 'iptables --help' for more information.
Bad argument `5666'
Try `iptables -h' or 'iptables --help' for more information.
I have included a copy of the script in this e-mail. There is a command syntax error here, but I am not sure what it is. Can someone lend a hand? Thanks.
I am trying to get an iptables script to run, but have run into some errors whenever I try to execute it. The error messages that are showing up on-screen are shown below:
[+] Setting up INPUT chain...
Bad argument `tcp'
Try `iptables -h' or 'iptables --help' for more information.
Bad argument `tcp'
Try `iptables -h' or 'iptables --help' for more information.
Bad argument `tcp'
Try `iptables -h' or 'iptables --help' for more information.
iptables v1.3.8: Can't use -i with OUTPUT
Try `iptables -h' or 'iptables --help' for more information.
Bad argument `5666'
Try `iptables -h' or 'iptables --help' for more information.
Bad argument `5666'
Try `iptables -h' or 'iptables --help' for more information.
I have included a copy of the script in this e-mail. There is a command syntax error here, but I am not sure what it is. Can someone lend a hand? Thanks.
A Journey In The Quest Of Knowledge
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-26-2008 04:05 AM
тАО01-26-2008 04:05 AM
Re: Problem with iptables script
I think that your problem is that you did not configured the INT_NET variable, so the command expects to be:
$IPTABLES -A INPUT -i eth0 -p tcp -s $INT_NET -p tcp
But as INT_NET is empty, you get:
$IPTABLES -A INPUT -i eth0 -p tcp -s -p tcp
Try configuring INT_NET first.
$IPTABLES -A INPUT -i eth0 -p tcp -s $INT_NET -p tcp
But as INT_NET is empty, you get:
$IPTABLES -A INPUT -i eth0 -p tcp -s -p tcp
Try configuring INT_NET first.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-26-2008 04:22 AM
тАО01-26-2008 04:22 AM
Re: Problem with iptables script
Hi,
You didn't define the ipddress in the following places of the script..
a) Remove the hash and mention the m/c ip address/subnet mask.
# INT_NET=192.168.10.0/24
b) Specify the ip address in the place of
this is for allowing incoming and outgoing packets.
## Accept connections from
$IPTABLES -A INPUT -i eth0 -p icmp -s -j ACCEPT
$IPTABLES -A OUTPUT -i eth0 -p icmp -d -j ACCEPT
$IPTABLES -A INPUT -i eth0 -p tcp -s --dport 22 --syn -m state --state NEW -j ACCEPT
$IPTABLES -A INPUT -i eth0 -p tcp 5666 -s -j ACCEPT
$IPTABLES -A OUTPUT -i eth0 -p udp 5666 -s -j ACCEPT
c) Make the script executable.
Then try,
I hope this will work...
Regds
Palani
You didn't define the ipddress in the following places of the script..
a) Remove the hash and mention the m/c ip address/subnet mask.
# INT_NET=192.168.10.0/24
b) Specify the ip address in the place of
this is for allowing incoming and outgoing packets.
## Accept connections from
$IPTABLES -A INPUT -i eth0 -p icmp -s
$IPTABLES -A OUTPUT -i eth0 -p icmp -d
$IPTABLES -A INPUT -i eth0 -p tcp -s
$IPTABLES -A INPUT -i eth0 -p tcp 5666 -s
$IPTABLES -A OUTPUT -i eth0 -p udp 5666 -s
c) Make the script executable.
Then try,
I hope this will work...
Regds
Palani
Everything is Possible and Anything is Feasible if u try
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP