Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1089665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T23:15:24+00:00 2026-05-16T23:15:24+00:00

my server has two ip’s: # IP one: 192.168.45.1 (allow MYSQL on Port 3306)

  • 0

my server has two ip’s:

# IP one: 192.168.45.1 (allow MYSQL on Port 3306)
# IP two: 192.168.45.2 (disallow MYSQL on Port 3306)

.

how can i configure iptables, to drop incoming connections for a specific IP and allow it to the other?

.

#
# Allow MYSQL-Port only for 192.168.45.1!
#

 /sbin/iptables -A INPUT -p tcp 192.168.45.1 --dport 3306 -j ACCEPT
 /sbin/iptables -A INPUT -p tcp 192.168.45.2 --dport 3306 -j DROP

# END SCRIPT

this seems not to work.. 🙁

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T23:15:25+00:00Added an answer on May 16, 2026 at 11:15 pm

    I think you want:

    /sbin/iptables -A INPUT -p tcp -d 192.168.45.1 --dport 3306 -j ACCEPT
    /sbin/iptables -A INPUT -p tcp -d 192.168.45.2 --dport 3306 -j DROP
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Facebook has two flows for Authentication, client-side and server-side. When should each one be
My company has two test servers modelled after customer configurations, one with Windows Server
How can one optimize the database structure that currently has two tables tbl_incoming and
I have two SQL Server tables. One table has four nvarchar(50) nullable columns and
i has two ubuntu server,and installed Mysql 4.0, ServerA and ServerB i want to
I have two grails servers: Server - has read/write access to the database Web
I'm working on a SQL Server 2008 database. This database has two tables. Book
I have two SQL Server 2008 databases called Anna and Bob . Bob has
Server has created a socket and bound to a port and started a thread
Assume a single application server instance that has two EARs deployed. The first EAR

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.